release: v0.4.10 — fix silent --device failures, real physical-device support - #189
Merged
Conversation
… support Every `--device` command silently did nothing and reported success. devicectl.zig shelled out to bare `xcrun devicectl`, which resolves through xcode-select; when that points at CommandLineTools, devicectl is not there. With an unchecked exit status on top, `ios launch --device` exited 0 having done nothing. Same bug class fixed for simctl in 0.4.6 — devicectl was missed. It now goes through the Xcode resolver by absolute path with a checked exit status, so failures surface devicectl's own diagnostic. Verified: a bogus udid used to exit 0, now exits 1 with "The specified device was not found". listDevicesJson also passed `--json-output -`, but devicectl only writes JSON to a file on disk, so that would have created a file named `-`. With the plumbing correct, physical devices gain real support: install, uninstall and list-apps now route to devicectl, plus new device-info, device-processes, lock-state, displays and reboot. lock-state addresses a common silent failure — automation that appears to do nothing because the screen is locked. devicectl exposes no screenshot and no UI hierarchy, so tap/swipe/type/ uitree/screenshot stay simulator-only regardless of what is attached; those need XCUITest. The registry's scope field now says so exactly: 29 simulator-only, 7 simulator+device, 5 device-only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012gzdKWXk7UbHm5TtSGqYBJ
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
Every
--devicecommand silently did nothing and reported success.devicectl.zigshelled out to barexcrun devicectl.xcrunresolves throughxcode-select, which on this machine points at CommandLineTools — wheredevicectldoes not exist. Combined withio.runCommandnot checking exit status, the failure was swallowed entirely.This is the same bug class fixed for
simctlin 0.4.6 — devicectl was missed. It now goes through the Xcode resolver by absolute path with a checked exit status.A second latent bug:
listDevicesJsonpassed--json-output -, but devicectl states that writing JSON to a file on disk is the only supported machine interface — it never writes JSON to stdout. That call would have created a file literally named-.Physical device support
With the plumbing fixed, real devices gain genuine support:
install/uninstalllist-apps--devicelaunch/terminatedevice-info,device-processes,lock-state,displays,rebootlock-stateis worth calling out: automation that appears to do nothing because the screen is locked is a common and confusing failure, and this makes it checkable.Verified against a real paired iPhone (
iPhone 16 Pro Max) —device-inforeturns actual hardware properties.Scope, stated honestly
devicectl exposes no screenshot and no UI hierarchy. So
tap/swipe/type/uitree/screenshotremain simulator-only no matter what is plugged in — those genuinely need XCUITest. The registry'sscopefield now reflects reality exactly:An agent reading
ios tools --jsoncan now tell "won't work on your phone" from "not set up yet" without trying it.Verification
All four release targets build;
test,test-fetch,test-browse, kuri-mobile's suite all exit 0; e2e-ios SKIPs cleanly with no simulator booted.Not verified: no iOS device is currently connected (all three paired devices report
unavailable), so the write paths —install --device,uninstall --device,reboot— are exercised only through the error path.device-infoagainst a paired-but-disconnected device does return real data.🤖 Generated with Claude Code
https://claude.ai/code/session_012gzdKWXk7UbHm5TtSGqYBJ