Skip to content
tapwright 2.0.0

tapwright 2.0.0

Pypi • November 26, 2026

Let AI agents operate real iPhones for QA, research and mobile workflows from Windows, Linux or macOS.

pip install tapwright==2.0.0

Real iPhone control for AI agents: QA, research and mobile workflows. From Windows, Linux or macOS.

Tapwright gives an agent (Claude, Codex, anything that speaks MCP) eyes and hands on your iPhone: it sees the screen as a list of elements plus a screenshot, and taps, types, scrolls, swipes, answers permission prompts and opens deep links. It works with any app on the phone: your TestFlight builds, development builds, the App Store version. Nothing is added to your app, and no Mac or Xcode is needed.

A Claude agent given one sentence ("test sign-up and a first trip the way a new user would") on a real iPhone, through Tapwright. It finds the planted bug (the app accepts "abc" as an email) and answers iOS's own permission prompt. Real time, with the agent's thinking pauses shortened; with the live view around it .

Apple's UI-testing framework (XCTest) can drive any app on a phone in Developer Mode, as long as a computer holds a developer connection to it. Tapwright runs WebDriverAgent (the XCTest runner behind Appium) on your phone, signed with your developer identity, and talks to it through pymobiledevice3 's tunnel. That tunnel needs no admin rights and works on any OS.

Since 2.0, taps, swipes, scrolls and the hardware buttons are sent from the computer to the phone's touchscreen through CoreDevice HID, which needs no runner; the runner reads the screen and is the fallback for touches. A screen that doesn't answer reads in time (a video feed, a game) no longer stops a call: see docs/AGENT-TOOLS.md .

Tapwright drives the whole phone from the outside (any app, system alerts, the screen). Its sibling project Tapline drives your own React Native app from the inside , through a small SDK in the app.

An iPhone on iOS 17 or later, and a USB cable for the one-time setup. Touches from the computer (the "hands" of 2.0) need iOS 18 to 26 (iOS 27 comes with a later release); on iOS 17 they go through the runner, as before. Tapwright installs pymobiledevice3 11.63 or later by itself.

A computer with Python 3.10+. On Windows, install Apple Devices from the Microsoft Store (it provides the USB connection); on Linux, usbmuxd .

An Apple Developer Program membership, for an App Store Connect API key (setup then creates the certificate and profile itself). Or bring your own Apple Development certificate (.p12) and a development profile for a wildcard App ID that includes the phone.

One-time setup , phone plugged in and unlocked:

It pairs with the phone (tap Trust ), checks Developer Mode, creates a development certificate and profile through the API (the private key stays on your computer), signs and installs WebDriverAgent, and pairs for network use. Details and the manual option: docs/setup.md .

Try it on one of your apps:

It opens the app, prints its first screen as elements, saves a screenshot, and closes it.

Run setup again any time: it skips what is done and ends with the two commands. To keep it working, tapwright doctor warns 30 days before the signing runs out, and tapwright doctor --fix (phone on USB) repairs what it can.

Give it to your agent. One command registers the MCP server and installs its guidance:

For a manual Claude Code registration:

Tapwright 1.7.5 provides whole-phone control by default. Apps, , Settings, system alerts and cross-app workflows are available. Permission judgment belongs to the agent and the user's instructions. Existing --apps , --dedicated , --policy and --no-policy options are compatibility inputs, not access restrictions. See the 1.7.5 migration contract .

The skill ( install already did this; the command is for the skill alone). It teaches an agent how to test with Tapwright: the loop, how to read an answer, what to do on each error, how to report, and the mistakes agents make.

Starter routes for the phone's own apps (Notes today; Reminders, Calendar, Mail and Messages follow). tapwright starters install [--maps DIR] adds them to your maps for drive {"route": ...} ; a route or place of yours is never overwritten, and the answer names the routes it kept.

Claude Code reads .claude/skills ; Codex and other agents read .agents/skills . The skill is skills/tapwright , in the open Agent Skills format, so skill installers can take it from this repository too.

Every action answers with what changed on the screen, not the whole list, and says how long the screen took to settle. Add screenshot: true for a picture. tapwright mcp --screenshots DIR saves the pictures as files instead of sending them. Errors are Error : ; for not_actionable the first word says why ( disabled , off_screen , covered , under_tab_bar , behind_alert , no_action ). The tools and their errors are the same as Tapline's: docs/AGENT-TOOLS.md .

From an agent's session to a test you keep. An agent that knows a flow runs it as one run , each step with the check that proves it worked:

With record , actions are saved in the same format. tapwright replay sign-up.json --junit out.xml runs the file again without an agent. Review scripts before executing them: app and policy flags do not limit their device access.

Scripts that repair themselves. When the app's screens moved, replay with repair: "suggest" (or tapwright replay FILE --apps ID --repair suggest ) replays the script as usual and adds the likely fix after the failed step; it tries no candidate (the script's own steps still run). repair: "apply" repairs a renamed or moved target, a new screen in the way, or a target now behind a scroll, as the run goes, and keeps a repair only when its own check holds (the step's expect , else the step's target resolves to one element) and the whole script then runs to its end; at most 3 candidates a step and 5 repairs a script. Every move of a repair (each trial and the way back after a rejected one) passes the same skip floor as explore 's moves; in the check below only the repaired and inserted steps (and the step an inserted road or scroll leads to) do, while the script's own unchanged steps (its Sign out, say) run as a plain replay runs them. apply then replays the repaired file itself from the script's fresh start (so it takes twice as long as a plain replay; the client waits up to 8 minutes) and refuses a script that can't start fresh ( "fresh": false , or no app ). It writes FILE.repaired.json and FILE.repair.md beside the script, never over it, and nothing at all when the run or that replay fails (a file that can't be written fails the run too). A failing expect is a finding, never repaired, and so is a step that types, a policy word, a native Back or a draftsOnly route. Every trial is a line of kind repair in the audit log. --repair apply --adopt (the command line, a person's choice; no tool call can adopt) replaces the script with the repaired one after that same run passed, keeping the original once as FILE.orig.json . The score only orders the candidates: Tapwright's weights are role 0.15, id_stem 0.35, words 0.35, position 0.10, component 0.05. record now saves each step's place and the seen facts of its element (role, position bucket, class, id stem; never text) so a repair can tell what moved.

Checks of how it looks, too. "expect": {"matches": "trip-saved"} on a step (or a compare_screen step) holds when the screen matches the reference picture of that name. record keeps the pictures to the script, in sign-up.references/ , so they travel together. After an intended design change, tapwright replay sign-up.json --update-references saves the new look; a failed check writes its picture with the changes in red to sign-up.diff/ . Reference pictures and those two folders are written whole or not at all, and never through a link; on Windows that narrows, but can't close, the window for a folder that another process of the same user swaps at that very moment. With --screenshots DIR , filmstrips and the difference picture an agent gets back are saved to that folder by the ordinary screenshot writer, outside this guarantee.

Driving fast. Tapwright learns an app as an agent uses it: each screen it recognises is a place, each move between places a road, kept in one map file per app ( ~/.tapwright/maps , or --maps DIR to keep it with your project, shared with Tapline). On ground the map knows, drive goes to a place in one call and no model is asked anything. On new ground, tapwright install also writes a driver agent, phone-driver : a subagent on your agent's fastest small model (Claude Code: .claude/agents/phone-driver.md on Haiku; Codex: .codex/agents/phone-driver.toml ; --driver-model NAME changes it) that sends several moves in one call and saves what it learns. No model runs inside Tapwright and no API key is asked for. Test accounts stay on your computer ( --accounts FILE ): the agent says tester2 , the tool types the password, and no answer, log or map holds it. brief: true (or tapwright mcp --brief ) shortens answers; tapwright call look makes a call without an MCP connection, to the running tapwright serve (whole-phone control by default); and a person's OK can be given in your chat, through the host's dialog, as well as in the live view ( --no-dialog turns that off).

tapwright serve is a small background process that owns the connection to the phone. Agent tools, the live view in your browser and any other client go through it, so you and an agent can one phone. Agent tools start it by themselves. To watch:

To keep real-time footage of the live view: tapwright record-video --out demo.mp4 [--seconds N] [--fps N] writes an H.264 MP4 ( pip install "tapwright[video]" ) and demo.frames.json , each frame's capture time on the action log's clock. A recording shows whatever is on the phone's screen, so record test data ( docs/setup.md ).

You see the phone's screen live and can drive it: click to tap, hold to long-press, drag to swipe, use the mouse wheel to scroll, and type into the focused field. Each step, the agent's or yours, shows in plain words under the phone ( Tap "Save trip" ), and Steps lists them. A step that couldn't be done shows in red with the reason ( Tap "Save" – covered ). The bar has Pause agent ; More holds , volume, the picture quality and Details (the element names and boxes, for when you're debugging). Your input goes first: the agent waits while you drive. The live view is reachable from this computer only, with an access token in the link.

Drags play on the phone after you let go: WebDriverAgent can't follow a finger live.

The picture is a stream of JPEG frames, 28 a second while the screen changes and 5 while it is still.

tapwright serve --video plays the phone's own video instead, 60 frames a second, with nothing installed on the phone. The phone and the computer must be on the same Wi-Fi, and the computer needs an AirPlay receiver: see docs/setup.md .

The volume buttons press the phone's real buttons.

Other tools can use the same daemon: the agent tools over HTTP ( POST /api/ ), and the live view protocol in docs/VIEWER-PROTOCOL.md .

After setup, unplug: on the same Wi-Fi, Tapwright finds the phone by itself, or give its address with tapwright serve --address 192.168.x.y . Over Wi-Fi every step is slower than over USB (see Status ); for long unattended runs, keep the cable in.

Reaching the phone from another network (a VPN such as Tailscale, or cellular) is not part of version 1. tapwright probe --host --watch exists to try it; treat it as experimental.

Agent judgment and user control

Tapwright provides device capabilities without app allowlists, label-based confirmations or grants. The agent follows your task and existing authorization. It should clarify consequential work outside that scope, without asking permission for each item in an authorized bulk operation. QA, competitor research, mobile social workflows and personal cleanup use the same tools.

Authentication and host checks protect the local control service. Keep its key private. Pause in the live view stops agent input; human input takes priority. Fresh targets, clear errors, dry-run and result verification remain part of reliable automation. dry_run: true on supported actions sends no input.

A delivered tap is not proof the app completed the intended action. Read the response and inspect the screen when needed. On timeout, check whether it happened before repeating it.

Actions are logged in ~/.tapwright/log/actions- .jsonl . Typed text is not logged; stored credentials remain redacted from routine text logs and recorded script text. tapwright serve --no-log disables the action log.

Screenshots, live view, video and saved --screenshots images show actual screen pixels; Tapwright does not mask them. A password typed into a nonsecure field or revealed by the app can appear in those images. Keep credential images private and omit them from shared reports.

Apple's automation sees what accessibility sees. Give important views accessibility identifiers ( testID in React Native) and labels. Games and custom-drawn screens show little beyond their screenshot; look with ocr: true reads their text from the picture. A screen that doesn't answer in time (a video feed such as TikTok's) comes back as Elements: none with that text as o refs; there tap an o ref, a point or a {text} , and audit and ux_check say unsupported .

Face ID and Touch ID require the person. With the phone's passcode saved ( --accounts FILE , phone.passcode ) an agent unlocks a locked phone with unlock , and tapwright serve --phone does it by itself at a new call; genuine XCTest passcode prompts still require the person.

Before it lets a UI test start, iOS may ask for the passcode ("Enable UI Automation"). Tapwright waits and tells the agent. Turn on Settings > Developer > Enable UI Automation on a test device, or an unattended run stops there.

Whole-phone access does not override Apple's signing, pairing, trust or XCTest passcode requirements.

System UI may be missing from accessibility. Use a fresh screenshot and coordinates when needed; verify the result.

Every number, how it was measured and how to run it yourself: docs/benchmarks.md . The bar they are held against: docs/QUALITY-BAR.md .

MIT. WebDriverAgent (BSD) and rcodesign (MPL-2.0) are downloaded at setup, not included. The runner is Tapwright's build of Appium's WebDriverAgent 16.15.3 with a faster tap and drag ( bo5amis/WebDriverAgent , built by GitHub Actions, checked by its SHA-256); TAPWRIGHT_WDA=appium tapwright setup --force installs Appium's own. Tapwright is not affiliated with Microsoft's Playwright or with Apple.

Release files for tapwright 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation .

Source distribution (sdist)

Built distribution (wheel)

Total release size: 2.7 MB

Release files / tapwright-2.0.0.tar.gz

Provenance describes where a file came from. On PyPI, provenance is shared via attestations , which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Release files / tapwright-2.0.0-py3-none-any.whl

Provenance describes where a file came from. On PyPI, provenance is shared via attestations , which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Security for tapwright 2.0.0

Provenance describes where a file came from. On PyPI, provenance is shared via attestations , which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Both files in this release have been uploaded with provenance metadata.

Attestation for tapwright-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Attestation for tapwright-2.0.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

Nov 26, 2026 2 release files Full provenance

Nov 21, 2026 2 release files Full provenance

Nov 19, 2026 2 release files Full provenance

Nov 19, 2026 2 release files Full provenance

Nov 19, 2026 2 release files Full provenance

Nov 19, 2026 2 release files Full provenance

Nov 18, 2026 2 release files Full provenance

Nov 18, 2026 2 release files Full provenance

Nov 17, 2026 2 release files Full provenance

Nov 17, 2026 2 release files Full provenance

Nov 15, 2026 2 release files Full provenance

Nov 15, 2026 2 release files Full provenance

Nov 14, 2026 2 release files Full provenance

Nov 14, 2026 2 release files Full provenance

Nov 14, 2026 2 release files Full provenance

Nov 13, 2026 2 release files Full provenance

Nov 13, 2026 2 release files Full provenance

Nov 13, 2026 2 release files Full provenance

Nov 13, 2026 2 release files Full provenance

Nov 13, 2026 2 release files Full provenance

Nov 13, 2026 2 release files Full provenance

Nov 12, 2026 2 release files Full provenance

Nov 12, 2026 2 release files Full provenance

Nov 12, 2026 2 release files Full provenance

Nov 11, 2026 2 release files No provenance

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.

Extracted Entities