开发者

Objective C - Excluding imports when on simulator

Is there a way I tell my code to import certain libraries only when it is being compiled to a device?

Something like this in the .h file

if (device) {
    #import "Lib1.h"
}

Having issue compiling t开发者_StackOverflowo a simulator with that specific class but works on a device.

Thanks,

Tee


You want to check whether or not TARGET_IPHONE_SIMULATOR is true during compilation.

#if !(TARGET_IPHONE_SIMULATOR)
#import "Lib1.h"
#endif
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜