As the subject says. I would like to define the configuration (Debug, Release, whatever) that is currently installed in Xcode at compile time
Sorting:
#if Configuration #endif
Did you know?
I use
#ifdef DEBUG <whatever> #endif
for wrapping log lines / debugging. I came across this on Cocoa Is My Girlfriend Dropping NSLog in the release version . I did not do this for other configurations, but I suspect that adding -DDEBUG to "Other C Flags" might define DEBUG. If so, then you should do something similar for RELEASE or DISTRIBUTION.
Another convenient is:
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
This is the same as saying "if I create an SDK for iOS 4.0 or higher" ...
Your snippet will work if you add $(CONFIGURATION) to the preprocessor macros in the project build settings.
$(CONFIGURATION)