title: Flex: How to Tell if the Current App is Running on a Simulator or a Real Device or Browser
body: <p>I have a Flex library, that is used in my Flex mobile or web app. If I run the app on iPad Simulator, <code>Capabilities.os</code> gives me <code>Mac OS 10.7.5</code>, so how can I tell (from the Flex library) if the current app is running on a simulator or real device or browser?</p>
  
  <p>The one I'm using is:</p>
  
  <pre><code>    public static function isSimulator():Boolean
      {
          return Capabilities.version.indexOf("IOS") &gt;= 0 &amp;&amp; Capabilities.os.indexOf("Mac OS") &gt;= 0;
      }
  </code></pre>
  
  <p>But I am not so confident with this.</p>