Dev.to AI 🤖 Ai 👁 0 📖 5 min read

How to Test Your iOS App on a Real iPhone with an AI Agent

You shipped a build to TestFlight. Before anyone else touches it, you want someone to open it on a real phone, sign in, tap through the main flow, and tell you where it broke. That someone can be an AI agent. This guide

You shipped a build to TestFlight. Before anyone else touches it, you want someone to open it on a real phone, sign in, tap through the main flow, and tell you where it broke. That someone can be an AI agent.

This guide shows how to let an agent on your computer (Claude Code, Codex, or any client that runs a local stdio MCP server) drive your iOS app on a real iPhone, screen by screen, and report pass or fail in plain words. It uses Manina AI CLI and the open-source ESP32 iPhone Agent board. Use it only on devices and accounts you own or are allowed to control, and use test accounts.

Why a real phone, and why this way

A simulator doesn't show you what a user sees on a device: real Screen Mirroring, the real keyboard, system sheets, permission prompts. Here the agent looks at the actual screen and taps the actual glass, so it meets the same screens your users do.

How it works:

  • Eyes. A Seeed Studio XIAO ESP32S3 board opens its own Wi-Fi hotspot and shows up in Screen Mirroring as ESP32 Agent. It passes the picture to your computer.
  • Hands. Plugged into the iPhone's USB-C port (or paired over Bluetooth), the board is a plain mouse and keyboard. With AssistiveTouch on, a click is a tap and a drag is a swipe.
  • Brain. Your agent on the computer. The CLI gives it screenshot, tap, swipe, type and Home.

Because it only sees pixels, it works with any app on the phone: a debug build, a TestFlight build, or an App Store app. Nothing is installed in your app, and iOS stays stock. No jailbreak.

What you need

Item Details
Board Seeed Studio XIAO ESP32S3, standard version (8 MB flash, 8 MB PSRAM), about $7, with its antenna attached. Not Sense or Plus.
iPhone XS or newer on iOS 18+ (or iPhone 8 / X on iOS 16.4+ with the TestFlight app 1.0.9+).
Cable A USB-C data cable, not charge-only.
Computer Chrome or Edge to flash the board once, plus Bluetooth for the CLI.

1. Flash the board

Open the firmware installer in Chrome or Edge, plug the board into your computer with the data cable, click Connect board, and pick it from the USB list. Keep the page open until it says Installed, then unplug.

Can't see the board? Try another data cable, plug in directly (no hub), close other apps using the serial port, or hold BOOT while plugging it in and try again.

2. Install the CLI and pair

# macOS / Linux
curl -fsSL https://manina.ai/install.sh | sh

# Windows PowerShell
irm https://manina.ai/install.ps1 | iex

# or, with Node.js
npm install -g esp32agent

Plug the board into the iPhone, turn on Bluetooth on the computer, and pair within three minutes of powering the board. Don't pair it in your OS Bluetooth settings; the CLI does it.

esp32agent devices
esp32agent pair

3. Let it see and tap

On the iPhone:

  1. Settings → Wi-Fi: join the board's ESP32Agent-… hotspot. With firmware v0.2.3 or later, esp32agent net shows its name and password.
  2. Control Center → Screen Mirroring → ESP32 Agent.
  3. Settings → Accessibility → Touch → AssistiveTouch: on. Keep the pointer visible, the phone unlocked, and in portrait.

The hotspot has no internet, so your app's network calls go over cellular data during the test. Then check:

esp32agent screenshot   # saves a PNG; open it and confirm it's the live screen
esp32agent calibrate    # measures the pointer

4. Connect your agent

claude mcp add esp32agent -- esp32agent mcp   # Claude Code
codex mcp add esp32agent -- esp32agent mcp    # Codex

For any other stdio MCP client, the command is esp32agent with the argument mcp. For Claude Code, esp32agent skill install also adds a skill with the phone workflow.

5. Write the test as a task

Install your build the way you normally do. The CLI can't install or launch apps, so tell the agent how to reach the app from the Home Screen, what to do, and what counts as passing:

Use esp32agent. From the Home Screen, search for "MyApp" and open it. Sign in with the test account in the note on screen, add one item to the cart and open the cart. Take a fresh screenshot after each action. Pass if the cart shows one item; otherwise stop and tell me which screen differed and why.

Tips that make these runs reliable:

  • One flow per task. Short and specific beats "test everything".
  • State the pass condition as something visible on screen.
  • Ask for a screenshot after every action. The agent works in a look → one action → look again loop; every command returns JSON and screenshot saves a PNG, so you can keep the evidence with your test notes.
  • Use io tap X,Y --aim for small targets. It finds the pointer first, then taps.

If you want to poke at it by hand first, the same commands the agent uses are available in your terminal:

esp32agent io button HOME
esp32agent io swipe 240,800,240,300
esp32agent io tap 120,410 --aim
esp32agent io text '[email protected]'
esp32agent io keys enter

6. Repeat a flow that passed

Regression checks are where this pays off. After a good run:

esp32agent history show latest      # what was done in the last run
esp32agent history list             # find the run ID
esp32agent intent save --name checkout --prompt "Add one item and open the cart" --from-run <RUN>

History and screenshots stay on your computer. You can move a saved intent to the iPhone app with esp32agent intent export; there, recorded moves replay without the AI while the screen still matches what was recorded.

To watch live while the agent works:

esp32agent screencapture --format h264 | ffplay -

For faster screenshots, put the board on the same Wi-Fi as your computer with esp32agent net join; taps then don't queue behind video.

Limits to plan around

  • The phone must stay unlocked and in portrait. Locking stops Screen Mirroring, so raise Auto-Lock for long runs.
  • iOS doesn't mirror passcode entry, Apple Pay, or DRM-protected video.
  • HOME is the only hardware button; no volume or power keys.
  • Typing is ASCII, one key per character, with no clipboard.
  • It drives the UI only. It doesn't read your view tree or app logs; pull those with your usual tools.
  • On a USB-C iPhone the board uses the port, so no wired charging during a run.
  • Screenshots go to whatever model your agent uses. Use test accounts.

Wrap-up

A real phone, a $7 board, and one MCP server give your agent the same view your users get. Start with one critical flow (sign-in, onboarding, checkout), write the pass condition in plain words, and save it as an intent once it passes.

Full setup and commands are in the CLI docs, and the source is on GitHub under MIT.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.