I want to distinguish debug state or release state in iOS App.
How can know programmatically? distinguish code signing identity?
distinguish provisioning profile?
I want to distinguish debug state or release state in iOS App.
How can know programmatically? distinguish code signing identity?
distinguish provisioning profile?
#ifdef DEBUG
static BOOL YourAppIsDebug = YES;
#else
static BOOL YourAppIsDebug = NO;
#endif
With DEBUG
being a preprocessor define in the Debug configuration but not in the Release configuration. Or just use #ifdef DEBUG
directly, since the static variable isn't going to change and you'd be compiling code that would never run (which might be optimized away by the compiler).
You can create custom build schemes that use configurations built off the standard debug and release configurations. You can then set signing identities for those build schemes as you want.