title: Built-in preprocessor token to detect iPhone platform
body: <p>Is there a single preprocessor token that can be used to detect any iPhone device or simulator at build time? I'm currently using:</p>
  
  <pre><code>#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
      // This is an iPhone build
  #endif
  </code></pre>
  
  <p>Is this the recommended approach or is there a better way? I'd prefer the macro to be built-in, i.e. defined by the compiler and not by an SDK header file I have to include.</p>
  
  <p>I'm not concerned about distinguishing between iPhone OS versions right now, but if there's an Apple documentation page that details all the relevant macros and when they are and aren't defined then I'd appreciate a link to it as my searching has come up short thus far.</p>
  
  <p>Thanks!</p>