Update:
More info on this here:
Is it true that one should not use NSLog() on production code?
~~~~~~~~~~~~~~~~~~~~~~~~
Situation
I have some pretty beafy NSLog calls that I use for debugging the more complex parts of my application. However, I just recently learned that these affect runtime performance!
Goal
I would like to remove my NSLog calls during any run where I am not actually performing Product > Run (aka command-R) from within Xcode - ESPECIALLY in situations when this thing is deployed on the App Store, but also when I am running the app when disconnected from Xcode (i.e. just tapping the icon while walking down the street).
Proposed Solution?
Assuming I've created a Preprocessor Macro of VIEW_DEBUG, would the following implementation effectively remove NSLog calls from executing in the cases I've described above?
<bunch of code>
#ifdef VIEW_DEBUG
NSLog(@"really complex logs entries");
#endif
<even more code>
This is a difficult one for me to 'test', so I figured I would appeal to more experienced minds. :)
Xcode Settings (for reference)