Reputation: 4912
I have a header file
with many constants
set for my project.
I would like to run a certain part of my code depending on the target I've chosen
.
I know how one way to do this is by using NSBundle's infoDictionary
method. However, I would like to use only .h file here for all my constants.
Currently I am using DEBUG
flag and running my code by checking this flag as such:
#if DEBUG
...
#else
...
#endif
I would like to be able to add my own flag(s) in my targets and check for those in header file, rather than rely on DEBUG flag.
Upvotes: 1
Views: 670
Reputation: 1471
Add the flags to the Preprocessor Macros in build settings for the target.
Upvotes: 7