I have noticed that this works in dev mode (testing on the simulator, etc):
#ifdef DEBUG
//do stuff
#endif
But when I archive and distr
The current version of Xcode automatically sets the DEBUG
macro in new projects. It does this only for Debug build mode however.
You can edit this in your projects Build Settings.
I recommend you add a new, separate macro instead of editing the DEBUG one. Maybe you could add a DISTRIBUTION
or DEPLOYMENT
macro only for the release mode.
You can also "Edit Scheme" to build Debug Configuration when archiving. See screenshot of "Edit Scheme" dialog in XCode.