Preprocessor macro for Apple Watch?
问题 I was looking at Apple's Lister (for Apple Watch, iOS, and OS X) sample. The sample performs a test for iOS and OS X: #import <TargetConditionals.h> #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR) @import ListerKit; #elif TARGET_OS_MAC @import ListerKitOSX; #endif However, there is no test for TARGET_OS_WATCH or similar. Grepping for watch in TargetConditionals.h delivers no hits: $ cat /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer /SDKs/iPhoneOS7.1.sdk