Skip to content

fix(platform-apple-helpers): harden Xcode 27 Device Hub simulator launching - #731

Open
lukas-preply wants to merge 1 commit into
callstackincubator:mainfrom
lukas-preply:fix/xcode-27-device-hub
Open

lukas-preply wants to merge 1 commit into
callstackincubator:mainfrom
lukas-preply:fix/xcode-27-device-hub

Conversation

@lukas-preply

@lukas-preply lukas-preply commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #728, which added the Device Hub fallback for Xcode 27 (refs #730).

This hardens launchSimulator and adds test coverage for it.

Changes

  • No -CurrentDeviceUDID for 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 when device.state !== 'Booted'; for a booted device Simulator.app is just brought to the front.
  • Fallback when the devices:// deep link is rejected. If open devices://device/open?id=<udid> fails, open DeviceHub.app (<Xcode>/Contents/Applications/DeviceHub.app) directly instead of aborting the run.
  • Warn instead of throw when neither app exists. launchSimulator runs in a Promise.all with the build, so a rejected open aborted the whole run:ios. The app still installs and launches headless via simctl, so a missing GUI is now a warning.
  • Tests for all six paths in 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 files
  • Xcode 27.0 / macOS 27, Simulator.app absent: launchSimulator for 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 the devices:// deep link (exit 0) and skipped simctl boot.
  • Xcode 26.3: shut-down iPhone 16 (iOS 26.2) opened Simulator.app with -CurrentDeviceUDID and booted; already booted device ran plain open Simulator.app, no alert.

Notes

🤖 Generated with Claude Code

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

@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
lukas-preply force-pushed the fix/xcode-27-device-hub branch from bdc8436 to 1d7ebcd Compare September 17, 2026 13:48
@lukas-preply lukas-preply changed the title fix(platform-apple-helpers): support Xcode 27 Device Hub when launching simulators fix(platform-apple-helpers): harden Xcode 27 Device Hub simulator launching Sep 17, 2026
@lukas-preply

Copy link
Copy Markdown
Contributor Author

@jmgraa feel free to close PR if adds too much, the main point was to unblock Xcode 27 which already landed via another PR #728

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.

1 participant