-1

I use

#define NSLog(p1, ...);

to put logging off in my code. Then I use

//#define NSLog(p1, ...);

to put logging on in my code This doesn't seem to have any effect now that I use Xcode 4.3.1.

Am i doing something wrong? Or is there an alternative?

Christian Loncle
  • 1,584
  • 3
  • 20
  • 30

2 Answers2

0

Use #define kMyString @"This is my string text!" and then use NSLog(@"String: %@",kMyString);

Abdullah Md. Zubair
  • 3,312
  • 2
  • 30
  • 39
0

I found the solution. The difference with the previous version of Xcode is that

  #define NSLog(p1, ...); 

doesn't work anymore when i put this code in the .m file. It only works from the .h file

Christian Loncle
  • 1,584
  • 3
  • 20
  • 30