Detect whether the application is in development mode or not.

Does anyone know a good way, in code, to determine if an application is running in development mode or in production mode?

+3
source share
1 answer

It completely depends on how you choose the development and production mode. Xcode 4 sets the flag by default DEBUGwhen you launch the application under debugging. You can create conditional code as follows:

#ifdef DEBUG
  NSLog(@"Only log when in debug");
#endif
+9
source

All Articles