Detect if app React app is running in simulator
<p>Passing initial properties for React Native doesn't work when following an example.</p>

<p>The the problem is that the value of <code>isSimulator</code> gets evaluated as <code>undefined</code>.</p>

<p>Xcode:</p>

<pre><code>  BOOL isSimulator = NO;
#if TARGET_IPHONE_SIMULATOR
  isSimulator = YES;
#endif

  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"ReactProject"
                                               initialProperties:@{@"isSimulator": @(isSimulator)}
                                                   launchOptions:launchOptions];
</code></pre>

<p>React:</p>

<pre><code>var isSimulator = this.props.isSimulator;
</code></pre>