title: NSFoundationVersionNumber in iOS 11 - How to detect iOS version programmatically
body: <p>In previous iOS versions I used <code>NSFoundationVersionNumber</code> to detect the iOS version:</p>
  
  <pre><code>#define IS_IOS10orHIGHER (floor(NSFoundationVersionNumber) &gt; NSFoundationVersionNumber_iOS_9_x_Max)
  #define IS_IOS9orHIGHER (floor(NSFoundationVersionNumber) &gt; NSFoundationVersionNumber_iOS_8_3)
  #define IS_IOS8orHIGHER (floor(NSFoundationVersionNumber) &gt; NSFoundationVersionNumber_iOS_7_1)
  #define IS_IOS7orHIGHER (floor(NSFoundationVersionNumber) &gt; NSFoundationVersionNumber_iOS_6_1)
  #define IS_IOS6orHIGHER (floor(NSFoundationVersionNumber) &gt;= NSFoundationVersionNumber_iOS_6_0)
  ...
  </code></pre>
  
  <p>Now I would to do the same for iOS 11, but I was not able to find the correct <code>NSFoundationVersionNumber</code>. <a href="https://developer.apple.com/documentation/foundation/nsfoundationversionnumber_ios_9_4" rel="noreferrer">The docs</a> show <code>NSFoundationVersionNumber_iOS_9_x_Max</code> to be the latest. </p>
  
  <p><strong>So, how is the correct <code>NSFoundationVersionNumber</code> to detect if iOS 11 is used?</strong></p>