title: React Native - Unable to execute JS call: __fbBatchedBridge is undefined
body: <p>I've been following this tutorial <a href="https://www.raywenderlich.com/126063/react-native-tutorial" rel="noreferrer">https://www.raywenderlich.com/126063/react-native-tutorial</a></p>
  
  <p>and decided to start from scratch after experiencing problems.</p>
  
  <p>I ran <code>react-native init PropertyFinder</code> and opened up the project in Xcode. When I compile and run it, it opens in the Simulator as expected showing:</p>
  
  <p><a href="https://i.stack.imgur.com/WDO9A.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WDO9A.png" alt="enter image description here"></a></p>
  
  <p>but shortly afterwards the screen fades and shows this:</p>
  
  <p><a href="https://i.stack.imgur.com/i6uoN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/i6uoN.png" alt="enter image description here"></a></p>
  
  <p>The error text is:</p>
  
  <pre><code>Unable to execute JS call: __fbBatchedBridge is undefined
  </code></pre>
  
  <p>It was working less than 24 hours ago so not sure what's going on. Fwiw, I completely deleted the project and started again.</p>
  
  <p>This answer (<a href="https://stackoverflow.com/questions/35474610/unable-to-execute-js-call-fbbatchedbridge-is-undefined">Unable to execute JS call: __fbBatchedBridge is undefined</a>) suggests checking it's fetching the code over the wire. It is so that doesn't seem to be the issue. </p>
  
  <p>The full code in the App Delegate is as follows:</p>
  
  <pre><code>/**
   * Copyright (c) 2015-present, Facebook, Inc.
   * All rights reserved.
   *
   * This source code is licensed under the BSD-style license found in the
   * LICENSE file in the root directory of this source tree. An additional grant
   * of patent rights can be found in the PATENTS file in the same directory.
   */
  
  #import "AppDelegate.h"
  
  #import "RCTRootView.h"
  
  @implementation AppDelegate
  
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
    NSURL *jsCodeLocation;
  
    /**
     * Loading JavaScript code - uncomment the one you want.
     *
     * OPTION 1
     * Load from development server. Start the server from the repository root:
     *
     * $ npm start
     *
     * To run on device, change `localhost` to the IP address of your computer
     * (you can get this by typing `ifconfig` into the terminal and selecting the
     * `inet` value under `en0:`) and make sure your computer and iOS device are
     * on the same Wi-Fi network.
     */
  
    jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&amp;dev=true"];
  
    /**
     * OPTION 2
     * Load from pre-bundled file on disk. The static bundle is automatically
     * generated by the "Bundle React Native code and images" build step when
     * running the project on an actual device or running the project on the
     * simulator in the "Release" build configuration.
     */
  
  //   jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  
    RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                        moduleName:@"PropertyFinder"
                                                 initialProperties:nil
                                                     launchOptions:launchOptions];
    rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    UIViewController *rootViewController = [UIViewController new];
    rootViewController.view = rootView;
    self.window.rootViewController = rootViewController;
    [self.window makeKeyAndVisible];
    return YES;
  }
  
  @end
  </code></pre>