I\'d like to do the following in Xcode:
Find all NSLog commands without comments, and replace it with //NSLog...
In other words, I want to comment all NSLog
You can use following Preprocessor Directives, it will not go with release mode. So you don't have to commenting NSLog().
#ifdef DEBUG
NSLog(@"YOUR MESSAGE HERE!");
#endif
wait there is far more simple method. Just add the following lines when you dont need NSLOG to your constants file
#define NSLog //
and comment it when you need it.
EDIT: In latest Xcode, you get error on above statement. So I figured out the best way is
#define NSLog(...)
right click on NSLog statement in xcode and select "find in project" as text.you would be prompted to a new window where you can follow the guidance given by Mihai Fratu.
TNQ