Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): add support for running on macOS devices and visionOS simu…
…lators (expo#28430) # Why - Why not. - Better alignment with Xcode 15. <img width="306" alt="Screenshot 2024-04-24 at 12 13 54 PM" src="https://github.com/expo/expo/assets/9664363/f7c5b1f2-84e3-44fb-81d1-e8d892cbd034"> <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How - Use showdestinations to find the macos device ID and validate that the destination target is supported. This has a high coldboot time but it nets out fine because we'll invoke xcodebuild later in the process. - This adds a high degree of uncertainty since the functionality is new and I only have a small subset of devices to test against. Anything that isn't accounted for has a debug log so hopefully we have a bit of future proofing. - We still sort iPhones to the top of the device list to preserve the happy path of `npx expo run:ios -d` + enter -> build on iPhone/iPad. - We now show compat devices of visionOS and macOS even for iOS-only schemes. This is how Xcode 15 works. <!-- How did you build this feature or fix this bug and why? --> # Test Plan - Manually tested by bootstrapping a new project and running `nexpo run:ios -d` and selecting visionOS simulator, physical Apple Vision Pro (perhaps I can claim the device as a business expense now), iPhone OTA and connected, and the new macOS target. - I added a parsing test for the xcodebuild results. These results are hard to parse correctly since phone names can contain any number of characters. I ran the matching through GPT a few times to sanity check if it was the safest approach. There are unit tests for the most aggressive behavior I was able to reproduce. <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). --------- Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
- Loading branch information