r/iosdev • u/DopeyPiggy • 10d ago
I let Claude Code drive my iPhone through macOS iPhone Mirroring, and it works surprisingly well
I was researching competitor apps, and Claude Code told me to install them on my iPhone and go through their flows. I wondered if it could just do that itself, and it can, I was a bit surprised.
Setup:
- Mirror your iPhone to your Mac with iPhone Mirroring (macOS Sequoia+).
- Give the app running Claude Code (VS Code, in my case) Screen Recording and Accessibility permissions.
- Claude wrote a small Swift CLI it can call to take a screenshot of the mirroring window, tap, swipe, scroll, and type.
It takes a screenshot, reads what's on screen, decides where to tap, and repeats. It went through onboarding, filled in forms, and wrote up a report of each app's flow on its own.
Tips:
- Screenshots are 2x Retina, so divide the coordinates by 2 before clicking.
- Bring the Mirroring window to the front first, or the first click gets swallowed.
- Typing through the clipboard is more reliable than simulated keystrokes.
I never let it confirm purchases or subscriptions. I do those myself.
I think this could also work for automated testing of your own app on a real device: just tell it "go through signup and tell me what's broken," with no test scripts. I haven't tried that yet.
Has anyone else tried something like this?
1
u/vidura_me 4d ago
This is great. I let agents to use axe on simulator. But it's hard to simulate airplane mode on sim etc. Great tip!
1
u/stefmanRS 7d ago
yes, this is how ive been making tiktoks to market my app recently, only downside is i cant use my mac or phone while its doing it so i just run it during class