How to detect Emulator

Use macro.

Sample

#if TARGET_IPHONE_SIMULATOR
   // For Emulator
#else
   // For Device
#endif