Sep 7, 2011 0
Remove NSLog from whole xcode project
This is very good optimization if you remove all your NSLog statement from project. But its hard to find every NSLog and remove it if you have a big project. Well here are two tips -
1) Use ifndef to replace NSLog with blank. Here is an example -
#ifndef __OPTIMIZE__
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...) {}
#endif
2) User regular expression in Find and replace to remove NSLogs
a) Press command + shift + f to open find and replace in whole project.
b) Search for
NSLog.*;
and replace it with blank
