diff --git a/docs/next/running-on-device.html b/docs/next/running-on-device.html index d84ea8768bb..0cc04002fe8 100644 --- a/docs/next/running-on-device.html +++ b/docs/next/running-on-device.html @@ -273,31 +273,19 @@ emulator-5554 offline
-During the development process, React Native has loaded your JavaScript code dynamically at runtime. For a production build, you want to pre-package the JavaScript bundle and distribute it inside your application. Doing this requires a code change in your code so that it knows to load the static bundle.
-In AppDelegate.m, change jsCodeLocation to point to the static bundle if you're not in debug mode.
#ifdef DEBUG
- jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
-#else
- jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
-#endif
-
-This will now reference the main.jsbundle resource file that is created during the Bundle React Native code and images Build Phase in Xcode.
--Note: The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase
-Bundle React Native code and images:
if [ "${CONFIGURATION}" == "Debug" ]; then
- export SKIP_BUNDLING=true
- fi
-
-As your App Bundle grows in size, you may start to see a white screen flash between your splash screen and the display of your root application view. If this is the case, you can add the following code to AppDelegate.m in order to keep your splash screen displayed during the transition.
// Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
UIView* launchScreenView = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] objectAtIndex:0];
launchScreenView.frame = self.window.bounds;
rootView.loadingView = launchScreenView;
-The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase Bundle React Native code and images:
if [ "${CONFIGURATION}" == "Debug" ]; then
+ export SKIP_BUNDLING=true
+ fi
+
+You can now build your app for release by tapping ⌘B or selecting Product → Build from the menu bar. Once built for release, you'll be able to distribute the app to beta testers and submit the app to the App Store.
You can also use the
diff --git a/docs/next/running-on-device/index.html b/docs/next/running-on-device/index.html index d84ea8768bb..0cc04002fe8 100644 --- a/docs/next/running-on-device/index.html +++ b/docs/next/running-on-device/index.html @@ -273,31 +273,19 @@ emulator-5554 offlineReact Native CLIto perform this operation using the option--configurationwith the valueRelease(e.g.react-native run-ios --configuration Release).