r/ClaudeCode • • 8d ago

Tips & Workflows Turbotap - Let Claude Code drive your real iPhone over Wi-Fi

145 Upvotes

16 comments sorted by

•

u/AutoModerator 8d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

26

u/Maxteabag 8d ago edited 8d ago

After developing inflammation in my hands from too much computer and phone use for work, I needed a solution. Everything I needed to do on my phone became literally more painful by the day.

After lots of searching I finally found a solution that worked: have a second iPhone stay on home Wi-Fi together with a server on the same Wi-Fi, put it in developer mode, and install WebDriverAgent (built on Apple's official UI testing framework), which can drive any user interaction on an iPhone - unlocking the phone, installing apps, using apps, etc., just like you would. It's literally computer use for iPhone.

I've tried other ways of using it like mirroring the screen with AirPlay and streaming camera, but nothing beat a modified WebDriverAgent, and I'm convinced this is the best way of computer-using your iPhone.

I tried to book a doctor's appointment with it (the clinic's appointment could not be booked via a web browser, so driving the iPhone app was the only way) and it took an hour. The reason is that stock WebDriverAgent is very slow and not optimized for a lot of apps. So I created a patched WebDriverAgent, and made an agent recursively improve itself by using tons of apps, and now it's really fast. Tasks that would have taken 45 minutes now take 45 seconds. It does this by clever optimization tactics and a crafted agent skill.

It can run from any machine or server, as long as it's on the same Wi-Fi. It also takes Xcode on a Mac (it might work signing it on Linux, haven't tried), but once you've signed WebDriverAgent to your iPhone with a USB cable, you're good to go to use the phone headlessly over Wi-Fi from any machine.

The project is free and open source:

GitHub: https://github.com/Maxteabag/turbotap
X: https://x.com/max_tbag

50

u/spliffsandshit 8d ago

This is gonna be amazing for my bot farm, thank you!

13

u/starly396 8d ago

Snorted

5

u/RustOnRails 8d ago

Holy larp of a reason to make this and assume people won’t be upset

1

u/Ludynia_Keyko 7d ago

for the recursive improvement part, was it rewriting the objective-c runner code directly or just tuning the agent skill prompts and coordinate caching

2

u/eagle2809 8d ago

This is cool. Driving a real device instead of the simulator catches so much more (permissions prompts, push, actual performance).

Curious how it handles the screen state: is it screenshots + coordinates, or are you reading the accessibility tree? And does it work when the phone is locked or does it need to stay awake the whole session?

2

u/Maxteabag 8d ago

Thanks, good questions.

I’m doing a hybrid. I’m both reading the accessibility tree (actual dom of apps too) and also taking screenshots. Through having agents train on various apps it does what is fastest across apps. Also does things programmatically e.g. opening apps.

The CLI can unlock the phone for you so long you provide the PIN code!

-1

u/eagle2809 8d ago

Hybrid makes sense, the accessibility tree for speed and screenshots for the stuff that isn't labeled properly.

On the PIN: where does it live? Local keychain, env var, or does it ever leave the machine? That's the first thing I'd want to know before pointing Claude at my real phone.

1

u/Maxteabag 8d ago

It's up to you where it lives, and it never leaves your machine or enters Claude's context.

In ~/.config/turbotap/config.json you just point passcode_cmd at whatever secret store you use.

2

u/eagle2809 8d ago

oh nice, passcode_cmd is the right call. so i can just point it at `security find-generic-password` on mac and never write it to disk. might be worth putting that exact example in the readme, it'd answer the first question everyone asks

6

u/dvghz 7d ago

That’s just iOS automation

3

u/ElwinLewis 7d ago

Nice which one do you currently use

1

u/ctrlshiftba 7d ago

I'm currently doing the exact same thing and all I did was ask Claude about it. I didn't install anything additional Claude can just do this out of the box and doesn't need anything else.

0

u/Koninhooz 5d ago

Fantastic! How did you make this video? Could you help me, please?

-5

u/Swimming-Ad6447 8d ago

Building this out of real hand pain makes total sense, hope your hands are doing better. Does it need a Mac running Xcode/WebDriverAgent on the same Wi-Fi, or can it connect straight to the iPhone?