Repository navigation
Description
Request: none
Problem
People who run agents against Simlock want to watch the iOS simulator their agent is using, in DeviceHub (Xcode 27) or Simulator.app (Xcode 26). Today Simlock never opens a window for a simulator, and there is no setting for it. Android has one: android.emulator.headless, default false, so emulators show a window unless the operator turns it off.
Who it is for
An operator who runs Simlock on their own Mac (a desk machine, a laptop) and wants to see what each agent does on its simulator, without opening the Simlock console.
Outcome
- A worker setting,
ios.simulator.headless, defaulttrue(as today).falsemakes Simlock show each simulator it boots: in DeviceHub's main window on a Mac with DeviceHub, else in its own Simulator.app window. Simlock never takes the keyboard focus from the app the operator is using. falseworks only withdrivers.ios.deviceSet: default, because DeviceHub and Simulator.app only see Xcode's own device set. With Simlock's own set, iOS does not start andsimlock doctorsays why, as for any other device set conflict today.- When Simlock starts DeviceHub or Simulator.app itself, closing a window or quitting the app leaves the simulators running.
- A window that cannot be opened never stops a lease: the simulator is handed on, and the daemon log says why there is no window.
How it works for the user
flowchart LR
C[operator: deviceSet default + ios.simulator.headless false, restart] --> B[simulator boots]
B --> D{DeviceHub installed?}
D -- yes --> M[DeviceHub main window shows it; others a click away in its list]
D -- no --> S[Simulator.app opens a window for it]
M & S --> L[agent uses it; operator watches]
B -. window fails .-> W[warning in daemon log; simulator handed on]
C -. deviceSet simlock .-> R[iOS turned off; doctor says why]
Before:
$ simlock config set ios.simulator.headless false
Unknown config key: "ios.simulator.headless"
After:
$ simlock config set drivers.ios.deviceSet default
$ simlock config set ios.simulator.headless false
Updated ios.simulator.headless in ~/.simlock/config.json; takes effect on daemon restart.
With drivers.ios.deviceSet left at simlock, the daemon starts without iOS, and simlock doctor shows the refusal: Refusing the ios device set: ios.simulator.headless is false, which needs drivers.ios.deviceSet "default".
Examples
ios.simulator.headless |
drivers.ios.deviceSet |
Today | After |
|---|---|---|---|
| unset | any | no window | no window |
true |
any | unknown key warning; no window | no window |
false |
default |
unknown key warning; no window | a window per simulator |
false |
simlock or unset |
unknown key warning; no window | iOS turned off, doctor says why |
"no" |
any | unknown key warning | invalid config naming ios.simulator.headless |
What could go wrong
- A new Xcode changes DeviceHub's undocumented link and no window opens. The daemon log warns; the slow lane catches it.
- The operator closes DeviceHub's main window; DeviceHub then keeps showing the old simulator until it restarts (a DeviceHub bug). The docs say so.
- The operator started DeviceHub or Simulator.app before Simlock did; quitting DeviceHub or closing a Simulator.app window then shuts the simulators down, and the health check reboots them within about a minute. The agent loses what was running.
Words used
- headless: a simulator runs with no window on the Mac. Today every iOS simulator is headless.
- DeviceHub: Xcode 27's app for simulators and devices, which replaces Simulator.app.
- main window: DeviceHub's one window with the device list on the left and the selected device's screen on the right.
- Xcode's device set: the folder Xcode keeps its simulators in,
~/Library/Developer/CoreSimulator/Devices; Simlock uses it underdrivers.ios.deviceSet: default.
Non-goals
- Windows for simulators in Simlock's own device set (DeviceHub and Simulator.app cannot see it).
- Stopping a Simulator.app the operator already runs from opening windows by itself while headless is on.
- Any Android change.
- Arranging or sizing windows, or one DeviceHub window per simulator.
- Changing any user-wide macOS or Xcode setting.
Completion conditions
- On a Mac with Xcode 27,
drivers.ios.deviceSet: defaultandios.simulator.headless: false, a leased simulator shows in DeviceHub's main window and the front app does not change (slow lane). ios.simulator.headless: falsewith Simlock's own set turns iOS off with the refusal message; Android still starts.- A failed window is a warning in the daemon log, and the lease is granted.
- The configuration reference and the worker configuration page describe the setting, its device set rule, and what closing and quitting do.
Open questions
none
Decisions
- none (no ADR: one task, and every choice is cheap to reverse). The choices are in Outcome, Non-goals and task ios.simulator.headless false shows each simulator in DeviceHub or Simulator.app #1239.
Shared values
none
Behaviours
| Behaviour (invoker, action, what it sees) | Seam | Cases | Task |
|---|---|---|---|
An operator sets ios.simulator.headless and the daemon loads it and answers it in config.get |
loadConfig, config.get |
unset → true; true; false; "no" → invalid config naming the key |
#1239 |
A daemon starts with ios.simulator.headless: false and a device set, and iOS starts or is refused |
IosSimctlDriver.create |
false + default → starts; false + simlock → refused, invalid-device-set and the message; false + unset → refused; true + simlock → starts |
#1239 |
Simlock makes a simulator ready with ios.simulator.headless: false and shows it in a window without taking focus |
iOS driver makeReady |
DeviceHub installed → open -g -b com.apple.dt.Devices --args -shutdownStartedDevicesOnQuit NO, then open -g devices://manage/select?id=<udid>; DeviceHub not installed → open -g -b com.apple.iphonesimulator --args -CurrentDeviceUDID <udid> -DetachOnWindowClose YES -DetachOnAppQuit YES; prepare; recover; slim; true → no open call |
#1239 |
| Opening the window fails and the simulator is still made ready, with the failure reported | iOS driver makeReady |
select exits non-zero; Simulator.app exits non-zero; a call times out; a call cannot start | #1239 |
| The daemon logs a window failure | main.ts window-failure bridge |
one failure → one warn line Could not open a window for iOS simulator with deviceId and detail |
#1239 |
A leased simulator on Xcode 27 with ios.simulator.headless: false shows in DeviceHub's main window |
slow lane | first lease with DeviceHub not running; front app unchanged; a screen stream gives frames with the window up | #1239 |
Tasks
- ios.simulator.headless false shows each simulator in DeviceHub or Simulator.app #1239 ios.simulator.headless false shows each simulator in DeviceHub or Simulator.app — an operator can watch every simulator Simlock boots. Risk: no window appears and only the log says why.
Completion conditions: all four are delivered by #1239's Done when.
Open work in the same area:
- ios.simulator.audio keeps every simulator silent #1238 (
ios.simulator.audio, task:ready): adds theios.simulatorblock this task extends, a step after boot in the samemakeReady, and a protocol bump. ios.simulator.headless false shows each simulator in DeviceHub or Simulator.app #1239 depends on it. - iOS: every simulator is a copy of a seed, and every virtual device serves one lease #1204 (baselines, PR feat(ios): every simulator is a copy of a seed, and every virtual device serves one lease #1210): rewrites
makeReadyand#bootAndWait, and makes each lease a new simulator. ios.simulator.headless false shows each simulator in DeviceHub or Simulator.app #1239 depends on it. - A lease names a baseline and gets a copy of it #1207 (PR feat(leasing): a lease names a baseline and gets a copy of it #1236) and A gateway routes a baseline request to a worker that holds it #1208: change
#bootAndWaitand the contract; reached through ios.simulator.audio keeps every simulator silent #1238, which depends on A gateway routes a baseline request to a worker that holds it #1208. - Keep a leased iOS simulator silent: ios.simulator.audio #1118 (feature of ios.simulator.audio keeps every simulator silent #1238): no further overlap.
Written by an agent.
Activity
V3RON commentedon Nov 3, 2026
Spec updated: Problem, Outcome, How it works, Examples, Non-goals, Completion conditions, Behaviours and Tasks written; task #1239 specified, checked and set ready.
Written by an agent.
V3RON commentedon Nov 5, 2026
Delivery run
Merged: none
Parked: #1239 — needs-hardware: slow lane unavailable (11.7 GiB free disk, needs 15); PR #1290 ready, review passed
Waiting: none
Decided: none
Written by an agent.
V3RON commentedon Nov 5, 2026
Delivery run
Merged: none
Parked: #1239 — gate refused twice; CI red on src/docs-manuals.test.ts (a module manual over 150 lines after the CI fix); PR #1290 reviewed, slow lane passes
Written by an agent.
feat(ios): ios.simulator.headless false shows each simulator in a win…
github-actions commentedon Nov 5, 2026
Closing: all 1 sub-issues are closed. The PR that closed the last one walks the completion conditions (delivery rule 9); reopen this if one does not hold on
main. Flip its ADRs to Accepted if delivery has not.V3RON commentedon Nov 5, 2026
Delivery run
Merged: #1290 (#1239)
Parked: none
Waiting: none
Decided: none
Written by an agent.