title: How to detect current iOS is 4.1 or 4.2?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3339722/check-iphone-ios-version">Check iPhone iOS Version</a>  </p>
  </blockquote>
  
  
  
  <p>I tried with this code:</p>
  
  <pre><code>#if (__IPHONE_OS_VERSION_MAX_ALLOWED &gt;= __IPHONE_2_2)
      NSLog(@"iPhone 4.2");
  #endif
  </code></pre>
  
  <p>but when I run it again on simulator 4.1, I still get the log "iPhone 4.2" in console.</p>
  
  <p>Thanks for helping me.</p>
  
  <p>Tung Do</p>