From 5dfc007af3ace125f11badf57f48c35aea817e6d Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Mon, 26 Dec 2016 03:33:59 -0800 Subject: [PATCH] Fix Running On Device guide for iOS Summary: Doing this from web so won't be able to screenshot the results. (also inadvertently deleted a line, oh well...) Closes https://github.com/facebook/react-native/pull/11625 Differential Revision: D4366928 Pulled By: mkonicek fbshipit-source-id: 966a3d8b90dde49b1de06e0249df110245943825 --- docs/RunningOnDevice.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/RunningOnDevice.md b/docs/RunningOnDevice.md index e7632d437..dde087388 100644 --- a/docs/RunningOnDevice.md +++ b/docs/RunningOnDevice.md @@ -61,7 +61,6 @@ Connect your device to your Mac via USB, then open Xcode. In the project navigat Finally, select your phone as the build target and press **Build and run**. - ## Setting up an Android device @@ -156,15 +155,22 @@ $ react-native run-android ## Connecting to the development server + + +You can also iterate quickly on a device using the development server. You only have to be on the same Wi-Fi network as your computer. Shake the device to open the [Developer menu](/react-native/docs/debugging.html#accessing-the-in-app-developer-menu). + + + You can also iterate quickly on a device by connecting to the development server running on your development machine. There are several ways of accomplishing this, depending on whether you have access to a USB cable or a Wi-Fi network. + ### Method 1: Using adb reverse (recommended) You can use this method if your device is running Android 5.0 (Lollipop), it has USB debugging enabled, and it is connected via USB to your development machine. - + Run the following in a command prompt: @@ -178,19 +184,19 @@ You can now use `Reload JS` from the React Native in-app Developer menu without You can also connect to the development server over Wi-Fi. You'll first need to install the app on your device using a USB cable, but once that has been done you can debug wirelessly by following these instructions. You'll need your development machine's current IP address before proceeding. - + You can find the IP address in **System Preferences** → **Network**. - + Open the command prompt and type `ipconfig` to find your machine's IP address ([more info](http://windows.microsoft.com/en-us/windows/using-command-line-tools-networking-information)). - + Open a terminal and type `/sbin/ifconfig` to find your machine's IP address. - + 1. Make sure your laptop and your phone are on the **same** Wi-Fi network. 2. Open your React Native app on your device.