title: Unable to determine if the Xamarin Forms application is running in the Simulator or on the Device
body: <p>I'm trying to determine if the app is running in the simulator or on the hardware (Apple iPhone) device.</p>
  
  <p>Various answers are all suggesting that I do the following:</p>
  
  <pre><code>bool isSimulator = MonoTouch.ObjCRuntime.Runtime.Arch ==
      MonoTouch.ObjCRuntime.Arch.SIMULATOR;
  </code></pre>
  
  <p>which I've added to my iOS app <code>AppDelegate.cs</code> file. But it does compile - I'm missing a namespace or assembly.</p>
  
  <p>Here's a pic of the FULL method (with the colour coding showing it cannot find the static property):</p>
  
  <p><a href="https://i.stack.imgur.com/uKt2Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uKt2Q.png" alt="enter image description here"></a></p>