Repository navigation
feat: add --headed to device boot - #565
Conversation
|
Warning Review limit reached
This review includes 12 billable files and costs up to $3.00. Or wait 24 minutes for your next included review. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
3685758 to
7e1aa0d
Compare
device boot keeps booting without a window by default. --headed (and headed: true on the device.boot JSON-RPC method) leaves out -qt-hide-window on Android emulators and opens Simulator.app on iOS simulators. Fixes #536
Xcode 27 ships DeviceHub.app instead of Simulator.app. The app is looked up inside the selected Xcode, the same one simctl uses.
Device Hub opens on its last selected device. The devices://device/open URL opens a window for the simulator that was booted.
7e1aa0d to
96ef907
Compare
Fixes #536
What changed
mobilecli device boottakes a--headedflag, named as in Playwright. The JSON-RPCdevice.bootmethod takes an optionalheadedboolean.--headedleaves out-qt-hide-window.--headedshows the simulator's window after the boot, using the app that ships with the selected Xcode (xcode-select -p):Simulator.appon the device.Simulator.app: opens the device's window in Device Hub throughdevices://device/open?id=<udid>.Out of scope
device booton a running device still returns "already running".--headedis used on a host with no display. The emulator's own error is returned.Things to know when reviewing
boot --headedreturns an error that says the simulator booted but its window could not be shown. The simulator stays booted.SimulatorDevice.Bootnow shares onebootstatuswait between the "already booting" and normal paths, so--headedapplies to both. The only other difference is that the "already booting" error text now includes the UDID.docs/openrpc.mdwas edited by hand to matchdocs/openrpc.json;make docswas not run.Testing
go build ./...,go vet ./...,go test ./... -racepass.golangci-lint run --new-from-rev=origin/mainreports 0 issues.headedin the boot request.Pixel_6with--headedstarted without-qt-hide-window, and without the flag started with it. An iPhone 17 simulator booted with--headedon Xcode 26.0.1 and returned ok; the Simulator.app window was not confirmed by an automated check.devices://device/open?id=<udid>URL was confirmed by hand to open the simulator's window, with Device Hub running and from quit. The final commit that uses it has not been run on Xcode 27 yet.Summary by CodeRabbit
--headedoption. Without it, booting remains windowless by default.