Skip to content

Conversation

@thymikee
Copy link
Contributor

@thymikee thymikee commented Dec 2, 2024

Summary

Initial support for run:ios command ported from RNC CLI. Changes compared to reference implementation:

  • removed the --terminal, --packager, --list-devices flags
  • changed xcdevice call to devicectl for faster lookup
  • added --catalyst flag for running apps in Mac Catalyst mode
  • prompt for a sim/device if device/udid/simulator are not specified (or specified incorrectly)
  • replaced caching last device with recent devices showing up on the top of the list
Screen.Recording.2024-12-09.at.14.07.58.mov

Test plan

Ported tests. Integration tests to be added in a separate PR

* - iPhone 11
*/

const fallbackSimulators = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for me it rarely worked because the names are iPhone 14 (iOS version). maybe our fallback logic can just get the first simulators from the command's output?

Comment on lines 87 to 82
const device = args.interactive
? await promptForDeviceSelection(devices)
: args.udid
? devices.find((d) => d.udid === args.udid)
: args.device
? matchingDevice(devices, args.device)
: args.simulator
? await matchingSimulator(devices, platformName, args.simulator, args.udid)
: undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a lot simpler, nice

@thymikee thymikee force-pushed the feat/run-ios branch 2 times, most recently from b9a03cf to 4b93420 Compare December 9, 2024 13:33
Copy link
Collaborator

@szymonrybczak szymonrybczak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@thymikee thymikee merged commit f118d44 into main Dec 12, 2024
1 check passed
@thymikee thymikee deleted the feat/run-ios branch December 12, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants