Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6710eef
feat(ios): control physical iOS devices over CoreDevice (experimental)
latekvo Jun 18, 2026
e7a105f
fix(preview): don't surface physical iOS devices in the simulator-onl…
latekvo Jun 22, 2026
9cb76fb
docs(physical-ios): align capability strings with launch-app/restart-…
latekvo Jun 22, 2026
1ac8c4a
Merge remote-tracking branch 'origin/main' into feat/physical-ios-dev…
latekvo Jun 22, 2026
1ba1bd5
Merge remote-tracking branch 'origin/main' into feat/physical-ios-dev…
latekvo Jun 24, 2026
a957bf4
fix(physical-ios): correct device discovery, tool routing, and capabi…
latekvo Jun 26, 2026
54429bb
fix(physical-ios): scope the native-profiler guard to the live-captur…
latekvo Jun 26, 2026
d155208
fix(physical-ios): gate launch-app behind the feature flag
latekvo Jun 26, 2026
13de304
docs(physical-ios): list describe + native inspection/profiling tools…
latekvo Jun 26, 2026
b73616b
fix(physical-ios): translate CoreDeviceError 9021 into an iOS-27 hint…
latekvo Jun 30, 2026
3975f70
test(physical-ios): make the 9021-in-argv guard bite; note CoreDevice…
latekvo Jun 30, 2026
7dd07d9
Merge remote-tracking branch 'origin/main' into feat/physical-ios-dev…
latekvo Jun 30, 2026
14329d5
fix(ios): don't eagerly resolve CoreDevice for a button with no HID e…
latekvo Jul 1, 2026
381f751
fix(ios): use FailureError/FAILURE_CODES for CoreDevice errors, fix m…
latekvo Jul 1, 2026
d404d52
fix(ios): reject physical iOS cleanly in native-profiler-stop/analyze…
latekvo Jul 1, 2026
e5fb457
Merge remote-tracking branch 'origin/main' into HEAD
latekvo Jul 1, 2026
9402017
Merge remote-tracking branch 'origin/main' into HEAD
latekvo Jul 1, 2026
49db844
fix(ios): gate native-devtools xcrun per device kind so remote sims a…
latekvo Jul 1, 2026
5cf479e
Merge remote-tracking branch 'origin/main' into feat/physical-ios-dev…
latekvo Jul 6, 2026
3ee0bc1
docs(physical-ios): describe is Apple-gated, not "not yet"
latekvo Jul 6, 2026
dc6587d
perf(physical-ios): persistent CoreDevice sidecar + home-screen describe
latekvo Jul 6, 2026
57e1ca6
feat(physical-ios): describe reads the real in-app accessibility tree
latekvo Jul 6, 2026
b89e4b0
Merge remote-tracking branch 'origin/main' into feat/physical-ios-dev…
latekvo Jul 10, 2026
fa1dbab
Merge remote-tracking branch 'origin/main' into feat/physical-ios-dev…
latekvo Jul 10, 2026
6246ef8
Merge remote-tracking branch 'origin/main' into feat/physical-ios-dev…
latekvo Jul 10, 2026
311c61e
feat(physical-ios): add WebDriverAgent parity support
entropyconquers Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,67 @@ Argent drives a growing set of targets through a single toolkit, each with the r

---

## Physical iOS devices (experimental)

Argent can drive a connected **physical iPhone** through the same tool interfaces used for an
iOS simulator. It automatically builds, signs, installs, and reuses
[WebDriverAgent](https://github.com/appium/WebDriverAgent) for XCTest input and accessibility;
the target app itself does not need to be modified or instrumented. The phone appears in
`list-devices` with `kind: "device"`.

The physical backend supports:

- tap, swipe, drag/pan, long press/hold, arbitrary touch sequences, pinch, and rotate gestures;
- keyboard text and named keys, paste, Home/Power/volume/Action buttons, and orientation;
- `screenshot`, nested live `describe`, `screenshot-diff`, app launch/restart, deep links, and
installing a device-signed `.app`;
- continuous Apple unified logs with `device-logs-start` / `device-logs-stop`;
- `native-profiler-*` for any foreground app, including protected system apps such as Maps.
Physical profiling records device-wide Time Profiler data and filters CPU/hang analysis to the
app PID, avoiding the task-port restriction that prevents a direct Instruments attach.

**Requirements**

- macOS with Xcode and an Apple Development team configured in Xcode Settings → Accounts.
- iOS 17 or later for the complete keyboard/control surface (the backend is tested on iOS 26.2).
- The iPhone connected, unlocked, trusted, with **Developer Mode** on.
- [`pymobiledevice3`](https://github.com/doronz88/pymobiledevice3) for physical-device unified
log streaming (for example, `pipx install pymobiledevice3`).

**Setup**

1. Enable the feature flag:
```sh
argent enable physical-ios-devices
```
2. Connect the iPhone (unlocked, trusted, Developer Mode on).

`list-devices` then includes the iPhone, and the supported tools work against its UDID.
The first `boot-device`, `launch-app`, or control call prepares WebDriverAgent. Argent discovers
the Xcode development team and signing identity, caches the signed runner under
`~/.argent/webdriveragent`, and keeps one WDA session per phone. No root tunnel or admin prompt is
needed for the XCTest path. A cold first preparation takes several seconds; later controls reuse
the session.

**Limitations / notes**

- Physical controls are registered on a strict local queue and acknowledged on the simulator's
gesture cadence. Read operations, log stop, and profiler stop are barriers, so screenshots and
artifacts always include all earlier controls even though XCTest may finish them later.
- `describe` is the frontmost app's exact nested XCTest hierarchy, including labels, values,
element roles, and frames in the same normalized coordinate space as the gesture tools.
- Device-wide profiling provides CPU and potential-hang analysis for protected apps. Apple's
Leaks/Allocations instruments require a process-scoped task port, so they are not available for
protected system apps.
- Simulator-only injected `native-*` UIKit/React inspection remains unavailable on a physical
target. Use `describe`, screenshots, unified logs, and native profiling instead.
- XCTest does not expose the App Switcher gesture. Power locks the device; unlocking may still
require the device passcode.
- Signing/logging overrides: `ARGENT_WDA_TEAM_ID`, `ARGENT_WDA_BUNDLE_ID`,
`ARGENT_WDA_SIGNING_ID`, and `ARGENT_PYMOBILEDEVICE3`.

---

## Installation

#### Prerequisites
Expand Down
Loading