Skip to content

Instantly share code, notes, and snippets.

@blinker13
Last active December 15, 2015 22:19
Show Gist options
  • Save blinker13/5332202 to your computer and use it in GitHub Desktop.
Save blinker13/5332202 to your computer and use it in GitHub Desktop.
Macros to differentiate between the Mac OS and iOS platform and between simulator and actual device on iOS
#define MAC_PLATFORM (TARGET_OS_MAC && !TARGET_OS_IPHONE)
#define IOS_PLATFORM (TARGET_OS_MAC && TARGET_OS_IPHONE)
#define IOS_DEVICE (IOS_PLATFORM && TARGET_OS_EMBEDDED)
#define IOS_SIMULATOR (IOS_PLATFORM && TARGET_IPHONE_SIMULATOR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment