Open DeviceHub on Xcode 27, where Simulator.app no longer exists - #1
Open
arthurrmp wants to merge 1 commit into
Open
Open DeviceHub on Xcode 27, where Simulator.app no longer exists#1arthurrmp wants to merge 1 commit into
arthurrmp wants to merge 1 commit into
Conversation
Xcode 27 removes Simulator.app and replaces it with DeviceHub.app, which lives in Contents/Applications rather than under the Developer directory. Booting a simulator therefore called `open -a` on a path that does not exist, and since the failure is discarded the simulator came up with no visible window at all. Prefer DeviceHub when it is present and fall back to Simulator.app for older Xcode, and quit DeviceHub too once the last simulator shuts down so it does not linger. Verified against Xcode 27 beta, which ships no Simulator.app anywhere in the bundle. The Simulator.app branch is unchanged from the previous behaviour but was not exercised, as no older Xcode is installed here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
arthurrmp
force-pushed
the
fix/devicehub-xcode27
branch
from
August 31, 2026 04:49
5034baf to
bb72504
Compare
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.
The bug
Xcode 27 removes
Simulator.appentirely and replaces it withDeviceHub.app. The two live in different places:Simulator.app→Xcode.app/Contents/Developer/Applications/Simulator.appDeviceHub.app→Xcode.app/Contents/**Applications**/DeviceHub.app(one level up, not underDeveloper)simulatorAppPath()builds the first path fromxcode-select -p, so on Xcode 27 it points at a file that does not exist.openSimulatorApp()discards the failure:The result is that pressing ▶ boots the simulator and no window ever appears, with no error surfaced. The simulator is running headless and the only way to notice is
xcrun simctl list.The fix
Probe for
DeviceHub.appand prefer it when present, falling back toSimulator.appotherwise, so both Xcode generations work from the same build.quitSimulatorAppIfIdle()also quits DeviceHub once the last simulator shuts down, matching the existing "no orphan dock icons" behaviour.Verification
mainon Xcode 27 beta: ▶ boots the device, no window.finded the whole Xcode 27 bundle plus a system-widemdfind: noSimulator.appanywhere. The bundle ships Create ML, Instruments, DeviceHub, FileMerge, Icon Composer and Accessibility Inspector.swift test: 70/70 pass. Two existing expectations updated for the added DeviceHub quit.The
Simulator.appbranch is unchanged in behaviour but was not exercised, as no older Xcode is installed on the machine used here.