fix: focus booted iOS simulators with Device Hub#750
Merged
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates iOS simulator “surfacing” behavior to prefer Xcode 27’s Device Hub when bringing up a newly booted simulator, while still falling back to the standalone Simulator app for older Xcode versions or when explicitly focusing an already-booted simulator.
Changes:
- Add host-app selection + fallback logic when opening the iOS simulator UI (Device Hub → Simulator; or Simulator-only when focusing an existing booted device).
- Update daemon simulator readiness to focus already-booted simulators so they’re visible even if the host UI was previously quit.
- Refresh unit tests and ADR documentation to reflect the new Device Hub behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/platforms/ios/simulator.ts | Adds Device Hub-first focusing and a “focus existing” path that opens standalone Simulator for already-booted devices. |
| src/platforms/ios/tests/index.test.ts | Updates/extends tests for Device Hub fallback and the new “focus existing” behavior. |
| src/daemon/device-ready.ts | Calls ensureBootedSimulator(..., { focusExisting: true }) for iOS simulators during readiness checks. |
| src/daemon/tests/device-ready.test.ts | Updates readiness test expectations for the new options argument. |
| docs/adr/0001-provider-first-integration-scenarios.md | Documents that local-only simulator UI launch may use Device Hub or Simulator. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -924,7 +955,7 @@ test('screenshotIos retries simulator capture timeouts and eventually succeeds', | |||
| assert.equal( | |||
| logLines.filter((line) => line === '__OPEN__ -a Simulator').length, | |||
|
Member
|
Thank you! |
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
Prefer Xcode 27 Device Hub when surfacing a newly booted iOS simulator, while keeping Simulator as the fallback for older Xcode installs. When a simulator is already booted but its host UI was quit, daemon readiness now opens standalone Simulator so the booted device is visible instead of remaining hidden in the background.