Guide
Signing WebDriverAgent
Apple will not let arbitrary software drive an iPhone. The way in is a test harness, signed by you, installed on your own device.
What is actually installed
WebDriverAgent is an open source test harness. It runs on the phone and exposes the same automation interface Xcode's UI tests use: tap here, swipe there, what is on screen. The agent builds it, signs it with your Apple account, and installs it over USB.
It is only running while a job is running. It is not a background service, and it is not shared between workspaces.
Free accounts expire after seven days
A free Apple ID can sign apps for your own devices, but the signature lasts seven days. When it lapses the harness will not launch, and the phone stops responding to automation with no warning beforehand.
This is the single most common surprise
Everything works for a week, then quietly stops. Re-enrolling the device rebuilds and resigns the harness, which buys another seven days.
A paid account lasts a year
The Apple Developer Program costs 99 USD a year and extends signing to twelve months. For one phone that is hard to justify. For anything you expect to leave running, it removes a weekly maintenance task and the outages that come with forgetting it.
The other limit worth knowing: a free account can register a small number of devices, while a paid one allows a hundred per device type per year.
Finding your team ID
A paid account signs against a team. The identifier is a ten-character string on the Membership page of your Apple Developer account, and it is what the agent uses when building.
When signing fails
Build failures almost always come down to the Mac pointing at the command line tools rather than Xcode, which the installer checks for, or an Apple ID that has not accepted the current developer agreement. Opening Xcode once and signing in resolves the second.
The full list of messages is on troubleshooting.