#if TARGET_IPHONE_SIMULATOR
//模拟器
#elif TARGET_OS_IPHONE
//真机
#endif
iOS 调试_模拟器与真机的区分
原文:http://blog.csdn.net/spring_06/article/details/18257897