Search code examples
objective-cnslog

NSLog with the release of the app


Possible Duplicate:
Is it true that one should not use NSLog() on production code?

While a developer develops an app he/she is most likely using NSlogs these logs can be huge or small.. but will this make a big presentation difference for the app if you publish it in the appstore while you still have the NSLog("something%i",[stuff]); in your code.?


Solution

  • In any case, you can add to your .PCH this line:

    #define DEBUG YES
    

    and call NSLog in this way:

    if(DEBUG) NSLog(@"debug mode");
    

    Remember to set #define DEBUG NO when publish your app!