Details
Without an argument it prints the mode, and in XCTest mode the runner state.
XCTest mode:
Input and screenshots go through WebDriverAgent (Appium's XCUITest runner), built with
the user's Xcode and signed by their Apple team. Use it for system alerts that
ignore the Bluetooth pointer, and dialogs that USB capture hides (not proven for all).
The user does once: Xcode signed in to an Apple account (Xcode > Settings > Accounts;
a free account works), Developer Mode on the iPhone, the developer trusted (Settings >
General > VPN & Device Management), UI Automation on (Settings > Developer > Enable UI
Automation). Errors say which step is missing. Do not change these settings yourself.
With Developer Mode off,
control xctest makes its hidden switch visible, then fails
with the steps: tell the user, wait until they confirm, then run it again.
Full guide:
https://ghosthand.dev/docs/xctest-modecontrol xctest builds WebDriverAgent (1-3 min the first time), starts it and waits
until it answers. After a daemon start, the first command starts it (about 15 s).
Same commands. lock, unlock, mute, unmute and keyboard shortcuts fail with
unsupported-in-mode: keep the iPhone unlocked (Auto-Lock Never). key sends only home,
volumeup, volumedown, enter, backspace, tab, space. type types any text.
A free team's signature lasts 7 days: then run control xctest --rebuild.
Recording and the dashboard preview still use USB screen capture.
control bluetooth stops the runner and goes back to the Bluetooth mouse and keyboard.