There is the #if targetEnvironment(simulator)
compiler directive and it would be useful if there was a way to tell whether the app running on a device was launched from Xcode and is connected to the debugger.
Is there a way to detect this in the app?
Using debug/release builds and DEBUG
variable would be less suited in our situation.