Skip to content

Commit fe55dd1

Browse files
burgalonFacebook Github Bot 4
authored andcommitted
Fixes #8252: Document how to connect to a non-default packager port o…
Summary: Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port Closes #8355 Differential Revision: D3475846 Pulled By: mkonicek fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
1 parent 1cc7ef0 commit fe55dd1

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

docs/RunningOnDeviceAndroid.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,22 @@ Have your device connected via USB with debugging enabled (see paragraph above o
9393
1. Run `adb reverse tcp:8081 tcp:8081`
9494
2. You can use `Reload JS` and other development options with no extra configuration
9595

96+
97+
### Running packager on a non-standard port
98+
99+
Launch the packager manually with `react-native start --port [PORT]`
100+
101+
For Android: Use the developer menu by clicking the menu button or shake. Select 'Debug server host & port for device' to set a different port.
102+
<center>
103+
<img src="img/AndroidDeveloperMenu.png" width="162" />
104+
<img src="img/AndroidDevSettings.png" width="150" />
105+
<img src="img/AndroidDevServerDialog.png" width="150" />
106+
</center>
107+
108+
For IOS: Edit the AppDelegate.m and change the line below to match the port number you're running:
109+
110+
```jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];```
111+
96112
### Configure your app to connect to the local dev server via Wi-Fi
97113

98114
1. Make sure your laptop and your phone are on the **same Wi-Fi network**.
140 KB
Loading
192 KB
Loading
80.4 KB
Loading

0 commit comments

Comments
 (0)