TARGET_OS_IPHONE TARGET_IPHONE_SIMULATOR #import 「TargetConditionals.h」

when building for iOS. Consider using #if !TARGET_OS_IPHONE ||TARGET_IPHONE_SIMULATOR to conditionally import this framework, first importing TargetConditionals.h if necessary.

	#if !TARGET_OS_IPHONE ||TARGET_IPHONE_SIMULATOR

    #import 
    #else
    

之前代码是将#import 写在了 条件 #if !TARGET_OS_IPHONE ||TARGET_IPHONE_SIMULATOR 一运行就报错了,原因是, TARGET_OS_IPHONE、TARGET_IPHONE_SIMULATOR 这两个宏是在TargetConditionals.h 文件里声明的。所以需要把#import 写在条件外面

#import 
#if !TARGET_OS_IPHONE ||TARGET_IPHONE_SIMULATOR

    
 
 #else
    

你可能感兴趣的:(ios)