Reputation: 1869
Is there a macro defined when compiling for iOS ?
I found __APPLE__
but I need a macro defined only when targeting iOS.
In a broader view, I'm unable to find a web page describing those macro for Xcode, is there any ?
Upvotes: 1
Views: 92
Reputation: 893
Found in TargetConditionals.h
Upvotes: 0
Reputation: 13549
You could probably use one of the macros in TargetConditionals.h
#if TARGET_OS_IPHONE
// do iPhone work
#endif
#if TARGET_IPHONE_SIMULATOR
// do iPhone simulator work
#endif
#if TARGET_OS_MAC
// do Mac work
#endif
Upvotes: 1