iOS 预编译指令

是否是模拟器

#if targetEnvironment(simulator)    print("模拟器")#else    print("真机")#endif

是否是DEBUG模式

#if DEBUG    print("DEBUG")#else    print("其余")#endif