I\'d like to know whether my app is being run on device or simulator at run time. Is there a way to detect this?
Reason being to test bluetooth api with simulator:
#if targetEnvironment(simulator) //Simulator #else //Real device #endif
Helps you to code against device type specific.