/v1/phones/{phone}/controlPUTxctest, builds
and starts WebDriverAgent in the background; GET /v1/phones shows its progress in
xctest. Fails with device-leased while an agent holds the iPhone. Agents use
PUT /v1/leases/{lease}/control instead.ghosthand tunnel url --new-token. The unix socket needs no tokenapplication/jsonrequiredbluetooth (default): the Mac is a Bluetooth mouse and
keyboard; screenshots come from USB screen capture. xctest: WebDriverAgent, an XCUITest
runner, taps, types and takes screenshots (they show dialogs that USB capture hides).
Needs Xcode, Developer Mode and UI Automation. No passcode unlock, mute or keyboard shortcuts.^[A-Z0-9]{10}$falsetitle and detail are for people.curl -X PUT "https://ghosthand.dev/macs/studio/v1/phones/<phone>/control" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "control": "bluetooth", "team": "string", "rebuild": false }'
{ "code": "device-leased", "title": "iPhone leased by another client", "status": 409, "detail": "Tommy's iPhone is in use by another lease:\n ses_456 (book a table on OpenTable), acquired 2 min ago, last used 10 s ago (tap)\nDecide first: if that task is still active, give up or tell the user the iPhone is busy." }