24230

Any low-level macro is defined to indentify iPhone OS w/o include any Apple header?

Question:

When compiling a vanilla iPhone project, any macro is defined to identify the platform is on iPhone OS, even when <em>no</em> header file is included?

TARGET_OS_MAC or TARGET_OS_IPHONE-like macros are not defined if no header is included.

So I am looking for macros defined at the similar level of __cplusplus , __GNUC__ , _MSC_VER ... etc.

Answer1:

gcc -x objective-c -E -dM /dev/null <ul><li>-E: Run preprocessor only</li> <li>-dM: Dump #define's.</li> <li>-: Read from source code stdin </li> <li>-x objective-c: Treat the source code as ObjC.</li> </ul>

Recommend

  • jQuery autocomplete request caching problem
  • Disable check for override in gcc
  • Which browser have this strange user agent? (IOS device)
  • How to create a new Bundle object?
  • Varnish/Apache Random 503 Errors
  • List comprehension with if conditional to get list of files of a specific type
  • HttpServletRequest getLocale returns OS locale not browser locale
  • How can go in last activity with resume button?
  • Getting short path in python
  • Access user's phone number on iOS 7
  • Exception gevent.hub.LoopExit: LoopExit('This operation would block forever',)
  • how to set variables in a php include file?
  • saving file generated by TCPDF
  • Using JRuby with Rails 3.2
  • How to view images from protected folder with php?
  • Eloquent paginate function in Slim 3 project using twig
  • how to avoid repetitive constructor in children
  • Ensure fsync did its job
  • Textfile Structure (tables)
  • Installing iPhone App to iPhone
  • How to use carriage return with multiple line?
  • Spark fat jar to run multiple versions on YARN
  • Can Jackson SerializationFeature be overridden per field or class?
  • Obtain ObjectIdHex value from mgo query
  • vba code to select only visible cells in specific column except heading
  • Redux, normalised entities and lodash merge
  • ActionScript 2 vs ActionScript 3 performance
  • Apache 2.4 - remove | delete | uninstall
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Cannot Parse HTML Data Using Android / JSOUP
  • Android Studio and gradle
  • json Serialization in asp
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • How do you join a server to an Active Directory (domain)?
  • Understanding cpu registers
  • -fvisibility=hidden not passed by compiler for Debug builds
  • coudnt use logback because of log4j
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • Why do underscore prefixed variables exist?