Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #8252: Document how to connect to a non-default packager port o… #8355

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/RunningOnDeviceAndroid.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@ Have your device connected via USB with debugging enabled (see paragraph above o
1. Run `adb reverse tcp:8081 tcp:8081`
2. You can use `Reload JS` and other development options with no extra configuration


### Running packager on a non-standard port

Launch the packager manually with `react-native start --port [PORT]`

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.
<center>
<img src="img/AndroidDeveloperMenu.png" width="162" />
<img src="img/AndroidDevSettings.png" width="150" />
<img src="img/AndroidDevServerDialog.png" width="150" />
</center>

For IOS: Edit the AppDelegate.m and change the line below to match the port number you're running:

```jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is out-of-date with the new RCTBundleURLProvider API

Copy link
Contributor Author

@burgalon burgalon Jun 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javache So I guess I should just remove the IOS notes right?


### Configure your app to connect to the local dev server via Wi-Fi

1. Make sure your laptop and your phone are on the **same Wi-Fi network**.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.