Skip to content

Commit

Permalink
Pass port when running on device (fix #17973)
Browse files Browse the repository at this point in the history
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Building for iOS device `react-native run-ios --device [id]` fails since port is not passed. This is a blocker for us and prevents us from updating to latest React Native stable.

I've tested this in our app and also in fresh app using RN master and verified that it works.

None.

[CLI] [BUGFIX] [local-cli/runIOS/runIOS.js] - Pass metro port when running on device
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes facebook/react-native#17983

Differential Revision: D6988299

Pulled By: hramos

fbshipit-source-id: 5169706600f87f13b9c9c105eb7d6db7a40194f1
  • Loading branch information
jozan authored and facebook-github-bot committed Feb 14, 2018
1 parent cf01f22 commit a224b5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runIOS/runIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function runIOS(argv, config, args) {
if (args.device) {
const selectedDevice = matchingDevice(devices, args.device);
if (selectedDevice) {
return runOnDevice(selectedDevice, scheme, xcodeProject, args.configuration, args.packager, args.verbose);
return runOnDevice(selectedDevice, scheme, xcodeProject, args.configuration, args.packager, args.verbose, args.port);
} else {
if (devices && devices.length > 0) {
console.log('Could not find device with the name: "' + args.device + '".');
Expand Down

0 comments on commit a224b5f

Please sign in to comment.