0

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.?

Community
  • 1
  • 1
Emre Akman
  • 1,212
  • 3
  • 19
  • 25

1 Answers1

1

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!

elp
  • 8,021
  • 7
  • 61
  • 120
  • 1
    If you are using Xcode 4 DEBUG is defined for development.If you use the release scheme DEBUG is already defined as NO, so there is no need to do this manually. – Abizern May 26 '11 at 10:50
  • I use Xcode4 and DEBUG is only a define name, that not conflict with xcode4 debug mode. If it isn't you can call this define DEBUGG! :) – elp May 26 '11 at 10:51
  • 1
    Again - no need for any of this. I just use these macros (https://gist.github.com/325926) in my .pch file and use the Xcode4 settings for Development and release. – Abizern May 26 '11 at 10:56
  • Who's panicking? I'm just pointing out to anyone else reading this answer that manual definitions of DEBUG aren't necessary if they are using Xcode4. – Abizern May 26 '11 at 10:59