When I run code such as the following:
- (void)viewDidLoad
{
#ifdef DEBUG
NSLog(@"debug");
#else
NSLog(@"here");
#endif
[super viewDidLoad];
}
I see "debug" printed in the log, but I did not define DEBUG
explicitly. Where is it defined?
It is most likely defined in your Build Settings under Preprocessor Macros.
Here is an example from one of my projects
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With