From fd41fc03c8ec4a3a8ada4290a2f780b869bf3554 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Thu, 10 Nov 2016 20:25:57 +0000 Subject: [PATCH] Updated docs for next --- releases/next/docs/running-on-device.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/next/docs/running-on-device.html b/releases/next/docs/running-on-device.html index 3a56c4ae871..91ff6aee7b0 100644 --- a/releases/next/docs/running-on-device.html +++ b/releases/next/docs/running-on-device.html @@ -77,7 +77,7 @@ emulator-5554 offline # Google emulator
  1. Make sure your laptop and your phone are on the same Wi-Fi network.
  2. Open your React Native app on your device.
  3. You'll see a red screen with an error. This is OK. The following steps will fix that.
  4. Open the in-app Developer menu.
  5. Go to Dev SettingsDebug server host for device.
  6. Type in your machine's IP address and the port of the local dev server (e.g. 10.0.1.1:8081).
  7. Go back to the Developer menu and select Reload JS.
-

Building your app for production #

You have built a great app using React Native, and you are now itching to release it in the App Store. The process is the same as any other native iOS app, with some additional considerations to take into account.

Building an app for distribution in the App Store requires using the Release scheme in Xcode. To do this, go to ProductSchemeEdit Scheme (cmd + <), make sure you're in the Run tab from the side, and set the Build Configuration dropdown to Release.

Apps built for Release will automatically disable the in-app Developer menu, which will prevent your users from inadvertently accessing the menu in production. It will also load the JavaScript locally, so you can put the app on a device and test whilst not connected to the computer.

Hint

You can also use the React Native CLI to perform this operation using the option --configuration with the value Release (e.g. react-native run-ios --configuration Release).

Once built for release, you'll be able to distribute the app to beta testers and submit the app to the App Store.

App Transport Security #

App Transport Security is a security feature, added in iOS 9, that rejects all HTTP requests that are not sent over HTTPS. This can result in HTTP traffic being blocked, including the developer React Native server.

ATS is disabled by default in projects generated using the React Native CLI in order to make development easier. You should re-enable ATS prior to building your app for production by removing the NSAllowsArbitraryLoads entry from your Info.plist file in the ios/ folder.

To learn more about how to configure ATS on your own Xcode projects, see this post on ATS.