title: trying to detect iphone x in swift always return false
body: <p>I am using simulator to test my all on iphone x I have searched for method to be able to detect iPhone x but all of them return false always </p>
  
  <p>this is one method of them </p>
  
  <pre><code>struct Device {
          // iDevice detection code
          static let IS_IPAD             = UIDevice.current.userInterfaceIdiom == .pad
          static let IS_IPHONE           = UIDevice.current.userInterfaceIdiom == .phone
          static let IS_RETINA           = UIScreen.main.scale &gt;= 2.0
  
          static let SCREEN_WIDTH        = Int(UIScreen.main.bounds.size.width)
          static let SCREEN_HEIGHT       = Int(UIScreen.main.bounds.size.height)
          static let SCREEN_MAX_LENGTH   = Int( max(SCREEN_WIDTH, SCREEN_HEIGHT) )
          static let SCREEN_MIN_LENGTH   = Int( min(SCREEN_WIDTH, SCREEN_HEIGHT) )
  
          static let IS_IPHONE_4_OR_LESS = IS_IPHONE &amp;&amp; SCREEN_MAX_LENGTH  &lt; 568
          static let IS_IPHONE_5         = IS_IPHONE &amp;&amp; SCREEN_MAX_LENGTH == 568
          static let IS_IPHONE_6         = IS_IPHONE &amp;&amp; SCREEN_MAX_LENGTH == 667
          static let IS_IPHONE_6P        = IS_IPHONE &amp;&amp; SCREEN_MAX_LENGTH == 736
          static let IS_IPHONE_X         = IS_IPHONE &amp;&amp; SCREEN_MAX_LENGTH == 812
      }
  </code></pre>
  
  <p>and this is another method</p>
  
  <pre><code>if UIDevice().userInterfaceIdiom == .phone {
              switch UIScreen.main.nativeBounds.height {
              case 1136:
                  print("iPhone 5 or 5S or 5C")
              case 1334:
                  print("iPhone 6/6S/7/8")
              case 2208:
                  print("iPhone 6+/6S+/7+/8+")
              case 2436:
                  print("iPhone X")
                  retValue = true
              default:
                  print("unknown")
              }
          }
  </code></pre>
  
  <p>why all methods return false ? is that because I am using simulator or what?</p>