-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
check isAvailable key on simulator object #21557
Closed
antonychan
wants to merge
1
commit into
facebook:master
from
antonychan:bug/fix-findMatchingSimulator
Closed
check isAvailable key on simulator object #21557
antonychan
wants to merge
1
commit into
facebook:master
from
antonychan:bug/fix-findMatchingSimulator
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 8, 2018
facebook-github-bot
added
the
Import Started
This pull request has been imported. This does not imply the PR has been approved.
label
Oct 8, 2018
facebook-github-bot
approved these changes
Oct 8, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@antonychan merged commit 1031872 into |
grabbou
pushed a commit
that referenced
this pull request
Oct 11, 2018
Summary: With the new xcode command line tools (10.1 beta2), running `xcrun simctl list --json devices` seems to gives us a slightly different format than what we were expecting. More specifically, the `availability` key is changed to `isAvailable` and returns `'YES'` if the simulator is available: Before: ```js devices: { 'iOS 9.2': [ { state: 'Shutdown', availability: '(unavailable, runtime profile not found)', name: 'iPhone 4s', udid: 'B9B5E161-416B-43C4-A78F-729CB96CC8C6', }, { state: 'Shutdown', availability: '(unavailable, runtime profile not found)', name: 'iPhone 5', udid: '1CCBBF8B-5773-4EA6-BD6F-C308C87A1ADB', }, ... ] } ``` After: ```js devices: { 'iOS 12.1': [ { state: 'Shutdown', isAvailable: 'YES', name: 'iPhone 6s', udid: 'D0F29BE7-CC3C-4976-888D-C739B4F50508', }, { state: 'Shutdown', isAvailable: 'YES', name: 'iPhone 6', udid: 'BA0D93BD-07E6-4182-9B0A-F60A2474139C', }, ... ] } ``` Without this fix, `npm run ios` is not able to launch the simulator correctly and returns the following error: ``` Could not find iPhone 6 simulator Error: Could not find iPhone 6 simulator at resolve (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:148:13) at new Promise (<anonymous>) at runOnSimulator (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10) at Object.runIOS [as func] (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12) at Promise.resolve.then (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:117:22) ``` Pull Request resolved: #21557 Differential Revision: D10248115 Pulled By: TheSavior fbshipit-source-id: 37197bbf828e4a6e254270d46411a6716a91afe3
grabbou
pushed a commit
to react-native-community/cli
that referenced
this pull request
Nov 6, 2018
Summary: With the new xcode command line tools (10.1 beta2), running `xcrun simctl list --json devices` seems to gives us a slightly different format than what we were expecting. More specifically, the `availability` key is changed to `isAvailable` and returns `'YES'` if the simulator is available: Before: ```js devices: { 'iOS 9.2': [ { state: 'Shutdown', availability: '(unavailable, runtime profile not found)', name: 'iPhone 4s', udid: 'B9B5E161-416B-43C4-A78F-729CB96CC8C6', }, { state: 'Shutdown', availability: '(unavailable, runtime profile not found)', name: 'iPhone 5', udid: '1CCBBF8B-5773-4EA6-BD6F-C308C87A1ADB', }, ... ] } ``` After: ```js devices: { 'iOS 12.1': [ { state: 'Shutdown', isAvailable: 'YES', name: 'iPhone 6s', udid: 'D0F29BE7-CC3C-4976-888D-C739B4F50508', }, { state: 'Shutdown', isAvailable: 'YES', name: 'iPhone 6', udid: 'BA0D93BD-07E6-4182-9B0A-F60A2474139C', }, ... ] } ``` Without this fix, `npm run ios` is not able to launch the simulator correctly and returns the following error: ``` Could not find iPhone 6 simulator Error: Could not find iPhone 6 simulator at resolve (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:148:13) at new Promise (<anonymous>) at runOnSimulator (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10) at Object.runIOS [as func] (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12) at Promise.resolve.then (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:117:22) ``` Pull Request resolved: facebook/react-native#21557 Differential Revision: D10248115 Pulled By: TheSavior fbshipit-source-id: 37197bbf828e4a6e254270d46411a6716a91afe3
hramos
removed
Import Started
This pull request has been imported. This does not imply the PR has been approved.
labels
Feb 6, 2019
t-nanava
pushed a commit
to microsoft/react-native-macos
that referenced
this pull request
Jun 17, 2019
Summary: With the new xcode command line tools (10.1 beta2), running `xcrun simctl list --json devices` seems to gives us a slightly different format than what we were expecting. More specifically, the `availability` key is changed to `isAvailable` and returns `'YES'` if the simulator is available: Before: ```js devices: { 'iOS 9.2': [ { state: 'Shutdown', availability: '(unavailable, runtime profile not found)', name: 'iPhone 4s', udid: 'B9B5E161-416B-43C4-A78F-729CB96CC8C6', }, { state: 'Shutdown', availability: '(unavailable, runtime profile not found)', name: 'iPhone 5', udid: '1CCBBF8B-5773-4EA6-BD6F-C308C87A1ADB', }, ... ] } ``` After: ```js devices: { 'iOS 12.1': [ { state: 'Shutdown', isAvailable: 'YES', name: 'iPhone 6s', udid: 'D0F29BE7-CC3C-4976-888D-C739B4F50508', }, { state: 'Shutdown', isAvailable: 'YES', name: 'iPhone 6', udid: 'BA0D93BD-07E6-4182-9B0A-F60A2474139C', }, ... ] } ``` Without this fix, `npm run ios` is not able to launch the simulator correctly and returns the following error: ``` Could not find iPhone 6 simulator Error: Could not find iPhone 6 simulator at resolve (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:148:13) at new Promise (<anonymous>) at runOnSimulator (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10) at Object.runIOS [as func] (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12) at Promise.resolve.then (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:117:22) ``` Pull Request resolved: facebook#21557 Differential Revision: D10248115 Pulled By: TheSavior fbshipit-source-id: 37197bbf828e4a6e254270d46411a6716a91afe3
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Merged
This PR has been merged.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the new xcode command line tools (10.1 beta2), running
xcrun simctl list --json devices
seems to gives us a slightly different format than what we were expecting. More specifically, theavailability
key is changed toisAvailable
and returns'YES'
if the simulator is available:Before:
After:
Without this fix,
npm run ios
is not able to launch the simulator correctly and returns the following error:Test Plan:
Updated findMatchingSimulator-test.js with a test case that uses the new format.
Release Notes:
[CLI] [BUGFIX] [runIOS] - Accomodate xcrun changes to look for
isAvailable
key so that it is able to match the correct simulator