Xcode Project: How to create conditional build via Xcode Project
I had tried to define preprocessed macro such as LIGHTER_VERSION_APP at target or project level setting. Now I’m trying to use this macro in the other dependent project of my main project. I’m not able to use this LIGHTER_VERSION_APP macro in other dependent project.
Can anybody tell me how I can do that?
Thanks
In your Xcode project or target settings, under the compiler settings, you can add any flags you like to “Other C Flags” and “Other C++ Flags”. You can simply add “-D LIGHTER_VERSION_APP” and it should now be defined when compiling your project. Once that’s done, you can use
#if defined LIGHTER_VERSION_APPin your code to turn stuff on or off.