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,
TeeYou want to check whether or not TARGET_IPHONE_SIMULATOR is true during compilation.
#if !(TARGET_IPHONE_SIMULATOR)
#import "Lib1.h"
#endif
精彩评论