title: Running React Native App on iPhone
body: <p>I'm trying to run an app created with react native (v0.3) without being connected to my computer at all. I've bundled the app with <code>react-native bundle --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle --platform ios</code> and run on my connected iPhone (also changed to <code>Release</code> on Xcode). </p>
  
  <p>This works fine, even if (after startup) I disable WiFi and disconnect the phone from my mac. But if I close the app entirely and try to start it again (without WiFi or USB connected) it crashes (it shows the app screen and crashes after some seconds)...</p>
  
  <p>At startup I can see a green bar labeled something like "Connecting to 192.*" (which is propably the IP address of my mac). How can I disable the connection entirely? The connection is quite useful to debug, but it's impossible to show the app to somebody.</p>
  
  <p>Uncommenting the <code>jsCodeLocation</code> section in <code>AppDelegate.m</code> as suggested in the <a href="https://facebook.github.io/react-native/docs/running-on-device-ios.html#using-the-offline-bundle" rel="nofollow">official documentation</a> is not quite helpful since it's not possible having this generated code:</p>
  
  <pre><code>#import "AppDelegate.h"
  
  #import "RCTBundleURLProvider.h"
  #import "RCTRootView.h"
  
  @implementation AppDelegate
  
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
    NSURL *jsCodeLocation;
  
    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
  
    RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                        moduleName:@"weather"
                                                 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;
  }
  </code></pre>
  
  <p>Or am I just missing something here?</p>
  
  <p>Versions:</p>
  
  <ul>
  <li>OSX 10.11.5 </li>
  <li>Xcode 7.3.1 </li>
  <li>React Native 0.3 </li>
  <li>npm 3.10.3</li>
  </ul>