fix(apple): reveal Simulator.app after a boot without taking focus
Summary
Every cold simulator boot, through open or boot, ran open -a Simulator. That activates Simulator.app, so its window jumped in front of whatever the user was working in. The call was added to focus the window for screenshot capture (#167); capture no longer depends on it.
Both call sites now run open -g -a Simulator. This launches or reveals Simulator.app without activating it, so the frontmost app keeps focus:
readiness/runtime.tsshowSimulatorcore/simulator.tsopenIosSimulatorApp
The timeout constant is renamed from IOS_SIMULATOR_FOCUS_TIMEOUT_MS to IOS_SIMULATOR_SHOW_TIMEOUT_MS. 5 files.
Validation
-
Tested commit
a33cafef87. -
pnpm check:affected --runpassed (443 files, 3454 tests). -
New readiness test: a cold boot opens Simulator with
-g. It fails when-gis removed. -
Live run on an iPhone 17 Pro / iOS 26.2 sim, shut down first, then
open com.apple.Preferences --platform ios:- the request log shows
open -g -a Simulator; - Simulator.app was running afterwards but never became the frontmost app.
I only ran this branch, not
main, to avoid stealing the user's focus while testing. - the request log shows