0

I have a project for which I added a configuration "AppStore" in addition to the default "Debug" and "Release". I want to include a small piece of conditional code based on compiling for the "AppStore" config. How do I do that? Is there a flag associated with that config that is available for an #ifdef? Can I associate a flag myself to tag this config? Should I create another target instead?

CuriousMarc
  • 501
  • 6
  • 11
  • 1
    You don't need to create another target. Check this answer: http://stackoverflow.com/questions/9081334/ios-optional-code-fragments-for-debug-builds – Rui Peres Apr 05 '13 at 06:02
  • Ah, thanks, I had not found this. It does answer my question indeed. – CuriousMarc Apr 05 '13 at 18:55
  • And by the way the answer is: look for the "preprocessor" build settings. Debug already had DEBUG= 1 as you'd expect. I added APPSTORE= 1 for the AppStore configuration, so I can compile optional code after an #ifdef APPSTORE directive. – CuriousMarc Apr 05 '13 at 19:17

0 Answers0