Adding compilation flags for multiple purposes in Xcode

I have an application with several goals. Each target has different functions. Where and how can I define compiler flags so that when constructing each goal, only those functions that I assigned to them are available.

For example, I like to do something like this.

#ifdef APP1 #define FEATURE_A #define FEATURE_B #elif APP2 #define FEATURE_B #else #endif 

Wherever I put #define APP1 or #define APP2 . APP1 and APP2 are application package identifiers. I would like to do this so that the definitions are not determined dynamically when the application starts (i.e., they should not be in the if statement), but are specified when the application is created.

Any suggestions?

Thanks.

+4
source share
1 answer

Place the appropriate definition in the target settings, “Preprocessor Macros”.

+7
source

Source: https://habr.com/ru/post/1343978/


All Articles