J john903 macrumors member Original poster Aug 4, 2008 #1 I was using these macros to determine if I was in Mac or iPhone but they no longer work with the latest SDK. Does anyone know what macros I can use to determine what platform I am on in my code? Thanks!
I was using these macros to determine if I was in Mac or iPhone but they no longer work with the latest SDK. Does anyone know what macros I can use to determine what platform I am on in my code? Thanks!
J john903 macrumors member Original poster Aug 5, 2008 #3 Those don't work for me either. Are these macros defined in a header file that I have to include?
K kainjow Moderator emeritus Aug 5, 2008 #4 Make sure you use it like so: Code: #if (TARGET_IPHONE_SIMULATOR) // iPhone simulator code here.. #else // blah #endif They will always be defined (when compiling for the iPhone) so you can't just check for #ifdef.
Make sure you use it like so: Code: #if (TARGET_IPHONE_SIMULATOR) // iPhone simulator code here.. #else // blah #endif They will always be defined (when compiling for the iPhone) so you can't just check for #ifdef.
Sbrocket macrumors 65816 Aug 5, 2008 #5 TARGET_IPHONE is actually what gets defined, not TARGET_OS_IPHONE
J john903 macrumors member Original poster Aug 5, 2008 #6 Ok, I found the problem. The macros are detected correctly in my .mm files but not in my cpp files. Any ideas?
Ok, I found the problem. The macros are detected correctly in my .mm files but not in my cpp files. Any ideas?