I have 3 targets. Let's say TargetA, TargetB, and TargetC. I have put in each target a different compiler directive in Targets > Target name > Build Settings > Apple LLVM 7.1 - Custom Compiler Flags > Other C Flags > Debug & Release.
I put -dTargetA
on TargetA, -dTargetB
on TargetB, -dTargetC
on TargetC. And then I have this code on AppDelegate's didFinishLaunchingWithOptions:
#if TargetA
print ("TargetA");
#else
#if TargetB
print ("TargetB");
#else
#if TargetC
print ("TargetC");
#else
print ("Not Recognised");
#endif
#endif
#endif
But when I ran it, I see "Not Recognised" on the output console, even though I run from any target. What's wrong? Thanks.