原文地址
http://www.jianshu.com/p/034fd7ebead1
判断方法
#if TARGET_IPHONE_SIMULATOR
NSLog(@"run on simulator");
#else
NSLog(@"run on device");
#endif
预处理命令简介
http://www.uml.org.cn/c++/200902104.asp