I am trying to use Schemes in XCode to modify some flags in build settings.
My first attempt was to add environment variables in schemes, but this seems to apply only at run time, not at compile time.
My second attempt was to add a script setting an environment variable as a pre-action. This doesn’t seem to work either.
I could solve this by duplicating targets, but that is makes it hard to keep build settings in sync. I would just like to use some conditional macros in my code.
Xcconfigs and/or configurations (you often have debug or release here) are often the way to accomplish this rather than schemes. You can
#includexcconfigs to compose and share settings from multiple xcconfigs.