Skip to content

[iOS] [CLI] Make run-ios find if a device is booted better #10558

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

Closed
wants to merge 2 commits into from
Closed

[iOS] [CLI] Make run-ios find if a device is booted better #10558

wants to merge 2 commits into from

Conversation

rmevans9
Copy link
Contributor

@rmevans9 rmevans9 commented Oct 26, 2016

Motivation
This morning I was trying to test on iPhone 7 with iOS 10 so I booted that device and ran "react-native run-ios" expecting it to notice I had a simulator running and install my app to it. Instead it switched my device to the iPhone 6s iOS 9.2. After digging it was found that run-ios did not handle multiple versions of iOS being installed very well when it came to checking for the booted device. This PR resolves that.

Test plan (required)
Tests were added for the situation of multiple iOS versions being installed and a slight change to the code was completed to make the new tests pass and continue to keep the old tests passing.

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @LearningDave to be a potential reviewer.

@rmevans9
Copy link
Contributor Author

After looking at this PR again I think there is another use case for multiple os versions that is not covered prior to this PR and also after. If I have 2 (or more) iOS versions installed all sharing a specific device (for ex iPhone 6s) and I run "react-native run-ios --simulator "iPhone 6s"" this will run it on the oldest iOS version available. I don't know if this matters since this PR would allow the developer to switch to the iPhone 6s on the newer OS version and then simply run "react-native run-ios" to have it run on the booted simulator. Let me know if anyone wants me to try and solve this additional use case with this PR.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 26, 2016
@rmevans9
Copy link
Contributor Author

Looks like travis failed on tvOS not anything I touched.

@douglowder
Copy link
Contributor

@rmevans9 The logging test failures in tvOS have been fixed, see #10568 . If you do an upstream merge, hopefully all tests pass now :)

@rmevans9
Copy link
Contributor Author

@dlowder-salesforce will do likely tomorrow. Thanks!

@facebook-github-bot
Copy link
Contributor

@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@lacker
Copy link
Contributor

lacker commented Dec 1, 2016

@facebook-github-bot shipit

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Dec 1, 2016
@facebook-github-bot
Copy link
Contributor

I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification.

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Dec 1, 2016
robclouth pushed a commit to robclouth/react-native that referenced this pull request Dec 7, 2016
Summary:
**Motivation**
This morning I was trying to test on iPhone 7 with iOS 10 so I booted that device and ran "react-native run-ios" expecting it to notice I had a simulator running and install my app to it. Instead it switched my device to the iPhone 6s iOS 9.2. After digging it was found that run-ios did not handle multiple versions of iOS being installed very well when it came to checking for the booted device. This PR resolves that.

**Test plan (required)**
Tests were added for the situation of multiple iOS versions being installed and a slight change to the code was completed to make the new tests pass and continue to keep the old tests passing.
Closes facebook#10558

Differential Revision: D4163616

Pulled By: hramos

fbshipit-source-id: 26b44fb73ef402ce252e7a754036279e15359170
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this pull request Jan 4, 2017
Summary:
**Motivation**
This morning I was trying to test on iPhone 7 with iOS 10 so I booted that device and ran "react-native run-ios" expecting it to notice I had a simulator running and install my app to it. Instead it switched my device to the iPhone 6s iOS 9.2. After digging it was found that run-ios did not handle multiple versions of iOS being installed very well when it came to checking for the booted device. This PR resolves that.

**Test plan (required)**
Tests were added for the situation of multiple iOS versions being installed and a slight change to the code was completed to make the new tests pass and continue to keep the old tests passing.
Closes facebook#10558

Differential Revision: D4163616

Pulled By: hramos

fbshipit-source-id: 26b44fb73ef402ce252e7a754036279e15359170
grabbou pushed a commit to react-native-community/cli that referenced this pull request Sep 26, 2018
Summary:
**Motivation**
This morning I was trying to test on iPhone 7 with iOS 10 so I booted that device and ran "react-native run-ios" expecting it to notice I had a simulator running and install my app to it. Instead it switched my device to the iPhone 6s iOS 9.2. After digging it was found that run-ios did not handle multiple versions of iOS being installed very well when it came to checking for the booted device. This PR resolves that.

**Test plan (required)**
Tests were added for the situation of multiple iOS versions being installed and a slight change to the code was completed to make the new tests pass and continue to keep the old tests passing.
Closes facebook/react-native#10558

Differential Revision: D4163616

Pulled By: hramos

fbshipit-source-id: 26b44fb73ef402ce252e7a754036279e15359170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants