diff --git a/local-cli/templates/HelloWorld/ios/HelloWorld/AppDelegate.m b/local-cli/templates/HelloWorld/ios/HelloWorld/AppDelegate.m index d4d87a689fb567..0a959f804385b1 100644 --- a/local-cli/templates/HelloWorld/ios/HelloWorld/AppDelegate.m +++ b/local-cli/templates/HelloWorld/ios/HelloWorld/AppDelegate.m @@ -16,7 +16,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( { NSURL *jsCodeLocation; - jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; + #ifdef DEBUG + jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; + #else + jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; + #endif RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"HelloWorld"