--device work the same as on the cable.
Wi-Fi for iPhones is off until you turn it on. While it’s off, every task uses the cable.
Turn on Wi-Fi for an iPhone
-
Set
MOBSTER_WIFI_TRANSPORT=1in your env file, then quit and reopen Mobster. The env file of Mobster for Mac is~/Library/Application Support/app.mobster.desktop/agent.env.POST /api/wirelesswith{"wifiTransport": true}does the same while it runs, andMOBSTER_WIFI_TRANSPORT=0turns it off again. -
Plug the iPhone in, unlock it, and turn on Wi-Fi for it:
This sets the same switch as Xcode’s Connect via network, over the cable, once. When Mobster can’t set it, it tells you to tick Connect via network for the phone in Xcode › Window › Devices and Simulators.
-
Unplug it, keep it unlocked and on the same Wi-Fi as this Mac, and check the link:
Turn it off
mobster wifi off stops using the phone over Wi-Fi at once. When Mobster turned the phone’s switch on, it turns it off on the phone too, over the cable:
mobster wifi off then says so and exits 1:
mobster wifi on or mobster setup that stopped midway still shows, and mobster wifi off with the phone plugged in turns it off. When you ticked Connect via network in Xcode yourself, Mobster leaves that switch alone, tells you to untick it there, and exits 0. With --json, the first case is {"ok": false, "code": "still_on", ...} (or off_failed), and the Xcode case is {"ok": true, "next": {"code": "xcode_on", ...}}.
Set up a new iPhone over Wi-Fi
With Wi-Fi for iPhones on, setting up a new iPhone (the first run, Add a device, ormobster setup) can end wireless, after one cable moment. Mobster asks you first, for each phone:
- In Mobster for Mac: Use Work iPhone over Wi-Fi with Turn on, on Add a device once the device is ready, and in its card’s Rules….
- In a terminal: once the phone trusts this Mac,
mobster setupasksUse Work iPhone over Wi-Fi when it's unplugged? Mobster turns on its Connect via network switch over this cable, the same switch as in Xcode.Enter means no. After a yes, it waits for the switch to be set before it ends. - With no terminal (
mobster setup --json, or output to a pipe): Mobster leaves Wi-Fi off, prints{"waiting": "wifi", "hint": ...}and exits 1. The hint names the yes to give:mobster setupon a terminal, ormobster wifi on --device "Work iPhone"with the phone plugged in.
- You plug the phone in, tap Trust and say yes. While it’s on the cable, Mobster turns on its Wi-Fi switch once.
- You turn on Developer Mode. The phone restarts and drops off the cable for a minute, and Mobster waits up to 5 minutes for it to come back.
- The helper app installs over the cable.
- Once the helper runs, Mobster waits up to 90 seconds for the encrypted link to the phone. Then the Wi-Fi row says Unplug the phone. If the link doesn’t come up, the phone stays on the cable and the row says why. Close Add a device with Keep working, and Mobster still finishes the step and sends a notification to unplug the phone.
mobster wifi on or Use over Wi-Fi. A phone you set up before has no Wi-Fi step.
GET /api/setup and GET /api/devices/{device}/setup carry the step as wifi: {state, reason, os, hub, cable}. Its state is asking while Mobster waits for your yes.
Switch between the cable and Wi-Fi
A switch waits until no task is running on the phone. Plug the cable in during a task over Wi-Fi, and the task finishes over Wi-Fi before Mobster moves to the cable. Unplug the cable during a task on the cable, and the task stops.
If the link drops during a task you started in Mobster for Mac or the terminal UI, Mobster says “Your iPhone went out of reach over Wi-Fi: bring it back or plug it in and Mobster carries on” and waits 2 minutes. When the phone answers again, over Wi-Fi or the cable, the task goes on. A schedule,
mobster run or a coding agent over MCP stops at once with “Your iPhone went out of reach over Wi-Fi, so Mobster stopped.” Either way, Mobster looks at the screen before it sends a step that may or may not have happened, and never sends it again blind.
Mobster checks the link every 10 seconds. When it drops, Mobster tries again after 1, 2, 4 and 8 seconds, up to 60, and at once when this Mac joins another network. With two phones, each has its own link and its own ports. In Mobster for Mac, the iPhone’s pane shows a Wi-Fi glyph while it’s on Wi-Fi, and Try again looks for an unreachable phone at once.
When the phone needs you
Over Wi-Fi, iOS asks you to unlock the phone, then for Face ID or its passcode, before it lets the helper app start. When nobody answers, the start fails with “Authentication canceled”. Mobster never unlocks a phone or enters its passcode, so it waits for you:- While the phone is locked, the start waits. Unlock the phone, and the start goes on within a few seconds.
- While iOS asks for Face ID or the passcode, the helper tries again until you answer.
- The phone reads Needs you on the Devices page and in the device switcher, and its pane says iPhone needs you with the steps: “Unlock it. Use Face ID or its passcode when asked. Or connect it to your Mac with a cable.”
- Plug the phone in instead, and Mobster uses the cable.
GET /api/wireless gives the problem code needs_you, and in GET /api/devices the phone’s wifi.needsYou is true.
What works over Wi-Fi
An app’s files, audio and logs need the cable.
Check the link
mobster wifi status lists each iPhone set up here: on the cable, on Wi-Fi, or not reachable over Wi-Fi, and whether Wi-Fi is on for it. It reads only.
mobster wifi probe checks one unplugged phone step by step and prints what it saw:
- Whether this network lets devices see each other.
- What Xcode’s device service reports for the phone, with every connection field.
- Whether the encrypted link is up, its address is in
fd00::/8, and this Mac reaches it through the link (autuninterface that holds this Mac’s end and isn’t a VPN). When it doesn’t, the step says why, for exampleutun4 holds no address on a link to fd7a:1c2b:3d4e::1 (fd12:3456:789a::2/64), so it isn't the tunnel to the phone. - What
devicectl device info lockStateanddevice info appsreturn. This step doesn’t change the result. - Whether the helper app answers through a relay on
127.0.0.1. With--start, the probe launches the helper over Wi-Fi first and stops it at the end. Quit Mobster for Mac before you use--start. - That
8100and9100don’t answer on the phone’s Wi-Fi addresses or on this Mac’s default gateway. On the phone’s Personal Hotspot, the phone is the gateway, so an answer from the helper there passes. - Whether usbmux lists the phone over the network, for the record only.
--json prints one object with each step and its fields.
Networks that keep devices apart
Guest, hotel and campus Wi-Fi often stop devices from reaching each other and block Bonjour, the way Macs and iPhones find each other. On such a network this Mac can’t find the iPhone. Mobster listens for a couple of seconds for what phones, TVs, speakers, printers and computers announce on the network. Hearing nothing on a network that’s up, it says:This network stops devices from seeing each other. Use the cable or your phone’s hotspot.
mobster doctor, mobster wifi probe, the Wi-Fi tile on Add a device and each device’s Rules all say it. The check only listens through macOS’s own Bonjour service, and sends nothing to the phone.
How the link stays private
Apple’s CoreDevice tunnel encrypts and authenticates the link between this Mac and the phone. Mobster adds no encryption of its own on it, and checks the route before it uses it:- The address is the phone’s own. It must be in
fd00::/8, and Xcode’s device service must report the same UDID for it as the phone you set up. Otherwise Mobster starts nothing and says “CoreDevice gave Mobster another iPhone’s Wi-Fi address”, and the phone stays on the cable. - The route is the tunnel. The
utuninterface must hold an address on the same network as the phone’s (a/64or narrower), or a point-to-point address whose peer is the phone’s. Mobster refuses a default route and autunthat macOS marks as a VPN. It checks before it starts the helper app over Wi-Fi and every 10 seconds while it runs, and stops using Wi-Fi once no task is running when the route stops passing. These checks refuse every route Mobster can tell apart from Apple’s tunnel, and don’t prove that the interface is Apple’s tunnel. - The helper app binds to the tunnel. Mobster starts it on the phone’s
fd00::/8address, not its Wi-Fi address. It answers only a request whoseHostis127.0.0.1,localhostor[::1], and refuses one with anOriginheader, such as a web page’s. Any program on this Mac can still send those headers. - Your network can’t reach it. On this Mac, a relay listens on
127.0.0.1only, on the phone’s usual ports (8100and9100, or8101and9101for a second phone). After the helper answers, Mobster checks ports 8100 and 9100 at the phone addresses it can resolve, and stops the helper if one accepts. On the default gateway, only an answer from the helper app stops it. The helper stays stopped until you start it again, anderrorin its state says why. - No plain TCP. Mobster never uses usbmux over the network (
iproxy -n), which would be plain TCP on your network.
When it doesn’t work
For a phone with Wi-Fi on,
mobster doctor adds whether Xcode’s device service sees it over the network, Developer Mode, whether macOS lets Mobster reach your network, a warning when a VPN is on, and whether this network lets devices see each other.
The phone has to be awake for Wi-Fi. For scheduled workflows, keep it unlocked and on the charger.
Control Wi-Fi from a script
Every route needs the API token.
With Wi-Fi for iPhones on, each iPhone in
GET /api/devices also has transport and wifi (enabled, reachable), and GET /api/events?topics=devices sends transport_changed with device, transport and reachable when a phone moves between the cable and Wi-Fi.