-
Notifications
You must be signed in to change notification settings - Fork 904
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
feat: allow selection of iOS sim with --udid
#1068
feat: allow selection of iOS sim with --udid
#1068
Conversation
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.
👍
packages/platform-ios/src/commands/runIOS/__tests__/parseIOSDevicesList.test.ts
Show resolved
Hide resolved
@@ -8,36 +8,24 @@ | |||
import {Device} from '../../types'; | |||
|
|||
/** | |||
* Parses the output of `xcrun simctl list devices` command | |||
* Parses the output of `xcrun instruments -s` command |
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.
good catch
packages/platform-ios/src/commands/runIOS/parseIOSDevicesList.ts
Outdated
Show resolved
Hide resolved
Alright, added Catalyst support back and made it a bit more clear that that’s a supported target. |
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.
Like it 👍
@grabbou mind having a look? |
}); | ||
text.split('\n').forEach(line => { | ||
const device = line.match( | ||
/(.*?) (\(([0-9\.]+)\) )?\[([0-9A-F-]+)\]( \(Simulator\))?/i, |
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.
Added lowercase flag, because some UUIDs may be lower-cased (discovered while local testing). Included test
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.
Oh, good catch; thanks! Was it an iPhone?
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.
yup, iPhone 8 to be exact
--udid
--udid
just update the cli-platform-ios inside @react-native-community/ hope it works |
Summary:
This makes it possible to be very specific about what simulator to use in the same way you’d interact with tooling such as
simctl
.Fixes #1078
Test Plan:
Given a device list like:
Simulator
Default
By UDID
Device
Default without iOS device connected
Default with iOS device connected
By UDID
Catalyst
By name
By UDID