Skip to content
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: correctly list ios devices and simulators #1823

Merged
merged 5 commits into from
Feb 9, 2023

Conversation

adamTrz
Copy link
Collaborator

@adamTrz adamTrz commented Feb 7, 2023

Summary:

Switched from xcrun xctrace list devices to xcrun xcdevice list when gathering info about available iOS devices and simulators.
Previous one wasn't providing enough information to distinguish between AppleTV / macOS / iPhone devices leading to unexpected behaviours.

Fixes #1816
Fixes #1807
Closes #1786

Test Plan:

Connect as many Apple devices as possible and:

  • try to run run-ios - it should try to launch RN App on all valid devices and simulators
  • try to run run-ios --list-devices - it should list all valid devices (even not available ones) and simulators

image

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.

Perfect work @adamTrz! 🙌

packages/cli-platform-ios/src/commands/runIOS/index.ts Outdated Show resolved Hide resolved
packages/cli-platform-ios/src/tools/listIOSDevices.ts Outdated Show resolved Hide resolved
@thymikee
Copy link
Member

thymikee commented Feb 8, 2023

Can you check if xcrun xcdevice is available on last 2 or 3 versions of Xcode?

@adamTrz
Copy link
Collaborator Author

adamTrz commented Feb 8, 2023

Can you check if xcrun xcdevice is available on last 2 or 3 versions of Xcode?

It's working on xCode 12 and 13, couldn't get my hands on lower versions yet ...

@thymikee
Copy link
Member

thymikee commented Feb 8, 2023

Awesome! That's more than enough I think :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants