-
Notifications
You must be signed in to change notification settings - Fork 906
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
fix: xcode 10.2 compatibility for run-ios
command
#138
fix: xcode 10.2 compatibility for run-ios
command
#138
Conversation
a88ce66
to
c0acc80
Compare
parse output of simulator list provided by xcode 10.2 In Xcode 10.2, the output of `xcrun simctl list --json devices` has changed to include a namespace within each version group. This commit makes a backwards-compatible adjustment to account for this change in format. To illustrate: Before ====== ``` { "devices": { "iOS 10.0": [ ... ] } } ``` After ===== ``` { "devices": { "com.apple.CoreSimulator.SimRuntime.iOS-10-0": [ ... ] } } ```
c0acc80
to
ae01760
Compare
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.
Looks good! Thanks for working on this PR. Left a small comment.
This has been submitted just now: facebook/react-native#23293. Both are different and technically valid. |
cc @dratwas @michalchudziak can you advice what would be best solution here? |
I think that solution introduced in this PR is nice. On the other hand, instead of parsing the simulator names into the legacy shape, we could check the output of |
PR #23293 works only in the case where no |
Summary:
In Xcode 10.2, the output of
xcrun simctl list --json devices
has changed to include a namespace within each version group. This commit makes a backwards-compatible adjustment to accountfor this change in format.
To illustrate:
xcrun simctl list --json devices
Output < 10.2xcrun simctl list --json devices
Output >= 10.2Test Plan
This is a trivial change that, by human inspection, should clearly be backwards-compatible with the previous code. The question, then, is whether this change addresses the problem of the
run-ios
command not being able to find any simulators on a machine with Xcode 10.2.Below is the actual output of running
xcrun simctl list --json devices
on my device (running MacOS 10.14.3 and Xcode 10.2 Beta):