mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
1.1 KiB
1.1 KiB
iOS Runner Protocol (v1)
The iOS XCTest runner accepts HTTP requests, processes commands, and stays alive for the session until a shutdown command.
Request
- Method:
POST - Path:
/command(not strictly validated) - Body: JSON
JSON schema (conceptual)
{
"command": "tap|type|swipe|snapshot|findText|listTappables|shutdown",
"appBundleId": "com.apple.Preferences",
"text": "Apps",
"x": 100,
"y": 200,
"direction": "up|down|left|right",
"options": { "onlyInteractive": true, "compact": true, "maxDepth": 8, "scope": "Camera" }
}
Fields by command:
tap: provide eithertextorx+y.type: requirestext.swipe: requiresdirection.snapshot: optionaloptions.findText: requirestext.listTappables: no extra fields.shutdown: no extra fields.
Response
{
"ok": true,
"data": { "message": "tapped" }
}
Errors return:
{
"ok": false,
"error": { "message": "..." }
}
Data payload may include:
message: stringfound: boolean (forfindText)items: array of strings (forlistTappables)tree: snapshot nodes (forsnapshot)