USB and Wi-Fi for iPhone automation
The Mobster USB connection carries screen reads and device commands between your Mac and iPhone. The sections below describe that USB setup. Wi-Fi is available as a preview after setup.
How Mobster reaches the phone
Mobster drives an iPhone through WebDriverAgent, an XCTest runner maintained by the Appium project. Xcode builds it, signs it with your Apple Account and installs it on the phone. Once it runs, it serves the phone’s accessibility tree and accepts taps and typing over HTTP on port 8100, and streams the screen as MJPEG on port 9100.
Those ports live on the phone. To reach them from the Mac, Mobster runs iproxy from libimobiledevice, which relays a port on the Mac to a port on the phone through usbmux, the channel the USB cable carries:
iproxy -s 127.0.0.1 -u <UDID> 8100:8100 9100:9100The USB setup uses three servers:
| Server | Listens on | Who can use it |
|---|---|---|
| The Mobster agent API | 127.0.0.1:8765 on the Mac | Requests with this launch’s token that pass the Host and Origin checks |
The USB relay (iproxy) | 127.0.0.1:8100 and :9100 on the Mac | Processes on this Mac |
| WebDriverAgent | The phone’s loopback, 127.0.0.1:8100 and :9100 | USB (usbmux) only |
How the USB setup limits access
WebDriverAgent has no authentication of its own. Anything that can reach its port can read the screen and tap, type and swipe as you. Out of the box, the runner listens on every interface of the phone, its Wi-Fi address included, and an iproxy started without a bind address listens on every interface of the Mac: lsof shows it on *:8100. On a shared network, that’s an open door to your phone.
Mobster closes it in three places:
- The runner listens on the phone’s loopback. Mobster builds WebDriverAgent with
USE_IP=127.0.0.1, so it binds the address usbmux reaches over USB, not the phone’s Wi-Fi address. - The video stream follows, and both refuse strangers. Upstream, the MJPEG socket listens on every interface no matter what. Mobster patches the pinned WebDriverAgent source so the stream binds the same address as the API, and so both refuse a request from a browser or one that names a host other than this Mac. If the patches don’t fit the source, the build fails instead of running open.
- The relay listens on 127.0.0.1 only. Mobster runs
iproxywith-s 127.0.0.1and refuses aniproxytoo old to take that flag, with the fix:
This iproxy can't be limited to this Mac. Update it: brew upgrade libimobiledevice libusbmuxdSimulators get the same treatment: WebDriverAgent listens on 127.0.0.1, and Mobster checks both ports with lsof after starting it and stops the runner if either one listens beyond the Mac. Mobster treats reaching the runner or the local API from another machine as a security vulnerability.
The Wi-Fi preview
Wi-Fi is a preview and is off by default. Set up your iPhone with a cable first. Enable Wi-Fi for iPhones in Mobster, then enable it for an existing phone. With Wi-Fi enabled globally, setup enables it for a new phone automatically. No unplugged-phone probe has passed yet.
Over Wi-Fi, the servers change:
| Server | Configured listener | Access |
|---|---|---|
| The Mobster agent API | 127.0.0.1:8765 on the Mac | Requests with this launch’s token that pass the Host and Origin checks |
| The Wi-Fi relay | 127.0.0.1:8100 and :9100 on the Mac | Processes on this Mac |
| WebDriverAgent | The phone’s fd00::/8 address reported by CoreDevice | Programs able to reach that address and pass the Host and Origin checks; no password |
Mobster requires the route to use a utun interface and refuses a route through Wi-Fi or Ethernet. The route check alone does not identify Apple’s tunnel. Mobster never uses usbmux over the network for WebDriverAgent. After the helper answers, Mobster checks ports 8100 and 9100 from this Mac at the phone addresses it can resolve. An accepting port stops the helper. On the default gateway, only a response recognized as WebDriverAgent triggers a stop. The check does not cover unresolved phone addresses or access from another machine.
For the network connection to the helper, Mobster relies on Apple’s CoreDevice tunnel. It adds no encryption or authentication and does not independently verify the tunnel’s cryptographic properties. Approval rules are the same as over USB.
App files, audio and logs need the cable. Photos and videos move over Wi-Fi.
How other tools reach the phone
From each project’s site, docs and README:
- TapKit captures the screen over USB and taps over Bluetooth, with AssistiveTouch on. Its MCP server and API send your agent’s commands through TapKit’s servers, and screenshots come back the same way and TapKit stores them (its security page).
- Bluetooth open-source apps such as Taplyne and xhoantran’s iphone-use act through AssistiveTouch too, from screenshots.
- iPhone Mirroring tools such as phone-harness and mirroir-mcp drive the Mirroring window on the Mac. Apple’s iPhone Mirroring works with one iPhone at a time, needs the phone nearby and locked and one Apple Account on both devices, and isn’t available in the EU.
Mobster trades setup, Developer Mode and Xcode, for the accessibility tree, simulators, and a local USB device connection, with Wi-Fi available as a preview after setup. How Mobster compares puts them side by side, and Mobster vs TapKit goes row by row.
Living with the cable
- Use a data cable. Some cables only charge. With the phone plugged in and unlocked,
idevice_id -lprints its UDID. - Trust this Mac. The first time, the phone asks whether to trust the computer. Tap Trust and enter your passcode.
- Keep the phone unlocked. The accessibility tree can’t be read on a locked phone, and Mobster never enters a passcode. For long or scheduled tasks, lengthen Settings › Display & Brightness › Auto-Lock.
- Turn on a Focus mode for long runs, so a notification doesn’t take the foreground mid-task.
- One Mobster process per phone. The Mac app,
mobster serve,mobster run --executeand the terminal UI each take the phone’s device lock, and a second one is refused while the first holds it. - If the cable comes out, the task stops with “Your iPhone was unplugged. Plug it back in and try again.” Plug it back in and the runner restarts by itself.
- If the Wi-Fi link drops, a task you started in the Mac app, the terminal UI or
mobster chatwaits up to 2 minutes for the phone to return. If it does not return, the task stops. A schedule,mobster runor a call over MCP stops at once. An action sent when the link dropped may already have happened. Mobster checks the screen before continuing and does not blindly repeat it. - Let Mobster renew the runner. With a free Apple Account, Apple signs it for 7 days at a time. Mobster for Mac refreshes it while the phone is plugged in and unlocked, and
mobster doctorsays how many days are left. - On a shared network, use the guided setup (
mobster serve --manage-device, or Mobster for Mac), which applies every patch above, video port included.
- Several phones. Each iPhone gets its own pair of ports on the Mac, from 8101 and 9101 up to 8199 and 9199, and its own device lock, so two phones never meet. On each phone the runner still listens on 8100 and 9100, and the relay maps the Mac’s pair to it, as in
iproxy -s 127.0.0.1 -u <UDID> 8101:8100 9101:9100. Several phones has the details.
Plug in your iPhone
Mobster for Mac sets up the cable, Developer Mode and the runner with you, step by step, for free (AI runs on a supported AI plan, an API key or a model on your Mac). Get Mobster for Mac and plug in your iPhone.
Device setup walks through the USB setup, and Troubleshooting lists each connection problem by what you see. Automate your own iPhone from a Mac shows what a task looks like once the phone is connected.
Questions
Can Mobster control an iPhone over Wi-Fi?
Yes, as a preview after USB setup. Set up your iPhone with a cable first.
Can I control an iPhone that isn't plugged into my Mac?
Mobster Remote lets Claude, ChatGPT and other assistants hand tasks to Mobster for Mac from wherever you are. Remote is off until you turn it on, and approvals stay on the Mac. Your iPhone connects by cable, or through the Wi-Fi preview after USB setup.
Is my iPhone exposed on the network while Mobster runs?
Not over USB. WebDriverAgent listens on the phone's loopback address, which only USB reaches, and the relay on your Mac listens on 127.0.0.1. The Wi-Fi preview configures the runner to use the phone's address reported by CoreDevice. After the helper answers, Mobster checks for exposure from this Mac at the phone addresses it can resolve.
Sources
- WebDriverAgent on GitHub
- WebDriverAgent source: default ports 8100 and 9100, and USE_IP
- WebDriverAgent source: the MJPEG socket takes a port only
- libusbmuxd on GitHub (iproxy and usbmux)
- libusbmuxd source: iproxy and its -s flag
- libimobiledevice-glue source: a socket with no address binds every interface
- TapKit docs: setup
- TapKit docs: security
- Taplyne on GitHub
- iphone-use by xhoantran on GitHub
- phone-harness on GitHub
- mirroir-mcp on GitHub
- Apple: iPhone Mirroring
- Apple: the Trust This Computer alert
- Mobster docs: device setup
- Mobster docs: several phones



