In Xcode (currently version 4.3.2), I have the DEBUG and NDEBUG macro definitions set for Debug and Release Builds, so I can selectively include debugging code with the ObjC preprocessor.
Problem: When I select Product --> Build For --> Archiving, neither DEBUG nor NDEBUG are defined. I have a similar problem with Product --> Build For --> Profiling.
Question: How do I properly set DEBUG and NDEBUG in xcode for the Archiving and Profiling builds, such that my conditional code inclusion (preprocessor) macros don't break?
My current workaround for Archiving a build before sending to the AppStore is to just temporarily delete the DEBUG code; but this is not a good practice, even though I'm protected by git's source-version-control-system.
Try add your definitions into
instead