Programmatically detect if app is being run on device or simulator
Keep in mind
UIDevice provides you already with information about the device itself.
[[UIDevice currentDevice] model]
You can also use the following:
TARGET_IPHONE_SIMULATOR tells you if you're in the iPhone simulator.
TARGET_OS_IPHONE tells you that you're working on the iPhone instead of MacOS.
#if TARGET_IPHONE_SIMULATOR NSLog(@"Running in Simulator - no app store or giro"); #else NSLog(@"Running on the Device"); #endif
and when ONLY interested in the device
#if !(TARGET_IPHONE_SIMULATOR) NSLog(@"Running on device"); #endif