Enable and Disable NSLog in DEBUG mode
Solution 1:
This should do the trick:
#ifdef DEBUG
# define NSLog(...) NSLog(__VA_ARGS__)
#else
# define NSLog(...) (void)0
#endif
Solution 2:
This is a bit shorter and also disables NSLog when using a device. If you're writing a game, NSLogs sent often can reduce your FPS from 60 to 20.
#if !defined(DEBUG) || !(TARGET_IPHONE_SIMULATOR)
#define NSLog(...)
#endif