iOS - detect if app is running from Xcode [duplicate]
This question already has answers here : Detecting if iOS app is run in debugger (8 answers) I'm trying to enable/disable parts of my code based on whether or not the code be being run via USB/Xcode (debug), or in production mode downloaded from the app store (release). I'm aware of checking if it is running in DEBUG or RELEASE mode like this: #ifdef DEBUG // Stuff for debug mode #else // Stuff for release mode #endif but the problem is that an obvious loop-hole I see is you can change the Build Configuration for the 'Run' build scheme from 'Debug' to 'Release'. A better way would be if I can