How to automate an iPhone from a Mac without jailbreaking

By Dean Hajjar ·

You don't need a jailbreak. A stock iPhone on iOS 16 or later can be driven from a Mac through a small test helper app (WebDriverAgent, open source) that you sign with your own Apple developer team, once Developer Mode is on. iFarm sets this up for you and lets you record taps once and replay them on every phone, with no code.

The short version

Apple doesn't let one app tap around inside other apps. But it does let developers run UI tests on their own devices, and UI tests can tap, swipe, type and read the screen in any app. Every no-jailbreak iPhone automation tool from a Mac is built on that door.

So the recipe is always the same:

  1. Turn on Developer Mode on the iPhone.
  2. Install a test helper app on it, signed with your own Apple developer team.
  3. Let a program on the Mac send that helper commands: tap here, swipe there, type this, what's on screen?

The phone stays stock. Nothing is cracked, patched or hidden, and you can remove the helper like any other app.

What WebDriverAgent is

WebDriverAgent is the open-source helper most of these tools use. Its own description: a WebDriver server for iOS "that can be used to remote control iOS devices". It runs on the phone as a UI test, listens for commands, and does them through Apple's own testing framework, XCTest.

A little history, since you'll see several repositories with the name:

iFarm uses WebDriverAgent too. On first start it downloads it (about 4 MB, checksum verified), builds it with your team, and installs it on each phone. On the phone it shows up as an app called iFarm. You never open it yourself; iFarm starts it from the Mac.

What you need

RequirementWhy
A Mac on macOS 14 (Sonoma) or lateriFarm and Xcode run here
Xcode, free from the Mac App StoreIt builds and signs the helper
An Apple ID added in Xcode → Settings → AccountsThe helper must be signed by a team you belong to
An iPhone on iOS 16 or laterDeveloper Mode exists from iOS 16
A data cable for the first connectionPairing, trust and Developer Mode need USB once; Wi-Fi works after that

The Apple ID can be a free Personal Team or a paid Apple Developer Program membership. The free one works but the helper has to be re-signed every 7 days (iFarm does that automatically); the paid one lasts a year. The differences matter more as you add phones: see free vs paid Apple developer account.

Developer Mode, trust and signing

Three iOS gates stand between a stock iPhone and automation. All three are one-time steps.

1. Trust this Mac

Plug the phone in, unlock it, tap Trust and enter the passcode. If the Mac asks "Allow accessory to connect?", click Allow.

2. Developer Mode

On the iPhone: Settings → Privacy & Security → Developer Mode → On. The phone restarts; unlock it and confirm Turn On. The switch only appears after the phone has been plugged into a Mac with Xcode. Apple documents it in Enabling Developer Mode on a device.

3. Sign the helper with your team

iOS only runs the helper if it's signed by an Apple developer team you belong to. In iFarm's setup guide you pick your team and a bundle ID prefix you own, such as com.yourname; the helper is installed as com.yourname.WebDriverAgentRunner. The first build takes 1–3 minutes, once per Mac, and each phone is registered with your team once.

If the phone then says Untrusted Developer, go to Settings → General → VPN & Device Management, tap your developer entry and trust it.

What iOS allows, and what it doesn't

Being honest about the limits saves hours of debugging.

You canYou can't
Tap, swipe, long press and type in any appSee touches someone makes directly on the phone
Press Home, volume, lock and wakeStart the helper on a locked phone
Read the text on screen and take screenshotsMake the helper run without Developer Mode
Open apps and linksKeep a free-team helper valid past 7 days without re-signing
Run the same steps on many phonesRun two UI-test drivers on the same phone at once

Two of these shape how you work day to day:

Your options, compared

There isn't one right tool. It depends on whether the automation should live on the phone or on the Mac, and whether you want to write code.

Shortcuts appAppiumiFarm
Runs fromThe iPhone itselfYour test code on a MacThe iFarm app on a Mac
Needs codeNoYesNo
Can tap inside any appNo: uses the actions apps and iOS offerYes, through WebDriverAgentYes, through WebDriverAgent
Many phones at onceOne phone eachYes, with a server or grid you set upYes, in one window
SchedulingPersonal automations on the phoneYour CI or cronBuilt in (random times in a window, weekdays)
Best forPersonal routines on one phoneEngineering teams with test suitesRecord-and-replay, device labs, people who don't code

Shortcuts: automation on the phone

Apple's Shortcuts app needs no Mac, no Developer Mode and no signing. Shortcuts run actions that iOS and apps provide (send a message, set a timer, run an app's own action) and personal automations can trigger them at a time or event. If what you want exists as a Shortcuts action, use Shortcuts. It can't press arbitrary buttons in another app's screen, which is where a UI-test helper comes in.

Appium: automation as code

Appium's XCUITest driver drives WebDriverAgent from test code in the language you choose. It's the standard for engineering teams that already keep tests in a repository and run them in CI. You'll write selectors, manage sessions, and (for many phones) run a server; see self-hosted iOS device farm vs iFarm.

iFarm: record once, replay everywhere

iFarm is a free Mac app that runs real iPhones from one Mac. It handles the helper for you and adds a no-code layer on top: record taps, swipes, holds, buttons and typed text in the live view; replay them on other iPhone sizes (each tap remembers the text on screen under your finger); edit steps; and schedule runs, with screenshots of any failure in History.

Automate an iPhone with iFarm, step by step

  1. Install Xcode from the Mac App Store and open it once to finish its setup.
  2. Add your Apple ID in Xcode → Settings → Accounts.
  3. Download iFarm, drag it to Applications and open it. The first time, macOS asks you to allow it in System Settings → Privacy & Security → Open Anyway (iFarm isn't notarized by Apple yet).
  4. Plug the iPhone in with a data cable, tap Trust, and turn on Developer Mode.
  5. In iFarm's setup guide, pick your signing team and bundle ID prefix. iFarm builds and installs the helper.
  6. Set the phone's Auto-Lock to Never, turn off Low Power Mode, and keep it charging.
  7. Open the phone large, press Record, and do the task once in the live view. Press Stop and save.
  8. Press Run on that phone, a group, or all phones. Add a schedule if it should repeat.

The full walkthrough is in the setup guide and in section 8 of the docs.

Note: iFarm doesn't hide automation from apps: no spoofing, no detection tricks. Only automate phones dedicated to the job, follow each app's rules, and stop any run by holding volume up + volume down on the phone.

Frequently asked questions

Do I need to jailbreak my iPhone to automate it?

No. Developer Mode plus a UI-test helper signed with your own Apple developer team is enough, and it works on stock iPhones on iOS 16 or later.

Is WebDriverAgent safe to install?

It's open source, so anyone can read what it does, and it only runs because you signed it with your own team. iFarm verifies the download's checksum before building it. You can delete it from the phone like any app.

Can I automate an iPhone over Wi-Fi?

Yes, after the first USB connection. iFarm uses the cable whenever one is plugged in and Wi-Fi otherwise, protected by a per-phone secret kept in the Mac's Keychain. You can turn Wi-Fi control off for USB only.

Why does my recording miss the taps I made on the phone?

iOS doesn't let any app see touches made directly on the screen. Record through the live view on the Mac instead.

Does it work with a free Apple ID?

Yes. The helper then has to be re-signed every 7 days, which iFarm does automatically, and Apple limits what a free team can register.