fix(platform-apple-helpers): harden Xcode 27 Device Hub simulator launching - #731
Open
lukas-preply wants to merge 1 commit into
Open
lukas-preply wants to merge 1 commit into
lukas-preply wants to merge 1 commit into
Conversation
|
@lukas-preply is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
Follow-up to callstackincubator#728, which added the Device Hub fallback: - Only pass -CurrentDeviceUDID to Simulator.app when the device is not booted yet, to avoid the "Unable to boot device in current state: Booted" alert for an already booted device. - Fall back to opening DeviceHub.app directly if the devices:// URL scheme is rejected. - Warn instead of throwing when neither Simulator.app nor DeviceHub.app is found; the app can still be installed and launched via simctl. - Add tests for launchSimulator. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lukas-preply
force-pushed
the
fix/xcode-27-device-hub
branch
from
September 17, 2026 13:48
bdc8436 to
1d7ebcd
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #728, which added the Device Hub fallback for Xcode 27 (refs #730).
This hardens
launchSimulatorand adds test coverage for it.Changes
-CurrentDeviceUDIDfor an already booted device. Passing it to Simulator.app for a booted device makes it re-attempt the boot and can pop an "Unable to boot device in current state: Booted" alert on every run (run-ios: "Unable to boot device in current state: Booted" alert when the simulator is already booted react-native-community/cli#2820). The flag is now passed only whendevice.state !== 'Booted'; for a booted device Simulator.app is just brought to the front.devices://deep link is rejected. Ifopen devices://device/open?id=<udid>fails, openDeviceHub.app(<Xcode>/Contents/Applications/DeviceHub.app) directly instead of aborting the run.launchSimulatorruns in aPromise.allwith the build, so a rejectedopenaborted the wholerun:ios. The app still installs and launches headless viasimctl, so a missing GUI is now a warning.runOnSimulator.test.ts, and a patch Changeset.Test plan
pnpm vitest run --root packages/platform-apple-helpers(38 tests, 6 new)tsc --noEmit -p tsconfig.lib.json, eslint and prettier on the changed filesSimulator.appabsent:launchSimulatorfor a shut-down iPhone 17 (iOS 27.0) opened Device Hub (window "iPhone 17 – iOS 27.0") and booted the device; for an already booted device it only ran thedevices://deep link (exit 0) and skippedsimctl boot.-CurrentDeviceUDIDand booted; already booted device ran plainopen Simulator.app, no alert.Notes
DeviceHubasSimulatorreplacement for Xcode 27+ expo/expo#46757). Kept Simulator first here so stable Xcode users take the unchanged path.🤖 Generated with Claude Code