HomeiOS Developmentswift - Can my iOS app use a compilation situation outlined in...

swift – Can my iOS app use a compilation situation outlined in a SPM module


I am defining a compilation situation in a SPM module that’s being utilized by my iOS app. I would like to have the ability to use the identical compilation situation in my app code to find out habits, however the situation does not appear to be getting set inside my app. The situation is working as anticipated throughout the SPM module, simply not within the iOS app that’s importing the module.

Bundle.swift excerpt

goal(..., 
swiftSettings: [.define("CONDITION", .when(configuration: .debug))]
)

SPM Module

#if CONDITION
// Compiled and executes as anticipated
#endif

App

#if CONDITION
// By no means compiled / triggered
#endif 

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments