Skip to main content
Setup in Mobster for Mac, or mobster setup in a terminal, walks you through each thing below. The helper app takes about 2 minutes to install the first time. Requirements lists the Mac and the Mobster account. To test an app with no phone, set up a simulator.

Set up your iPhone

Mobster for Mac does this on its first run (Mobster for Mac), and for each device after that on Add a device (Devices and health).
  1. Plug in the iPhone, unlock it and tap Trust.
  2. Mobster installs the helper app on the iPhone, signed with the Apple Account in Xcode.
  3. On the iPhone, open Settings › Privacy & Security › Developer Mode, turn it on and restart. iOS shows the switch once the install has started.
  4. Choose Allow so Mobster can tap and type.
On Add a device, the screen then names your iPhone and says it is ready. The first run goes on by itself.

Trust this Mac

The first time you plug the iPhone into this Mac, iOS asks whether to trust it.
  1. Unlock the iPhone.
  2. Tap Trust.
  3. Enter your passcode. Mobster never enters it.
If you tapped Don’t Trust, unplug the phone and plug it in again, and iOS asks again.

Turn on Developer Mode

iOS runs the helper app only with Developer Mode on. It’s a switch on the phone, and Mobster never turns it on for you.
  1. On the iPhone, open Settings › Privacy & Security › Developer Mode.
  2. Turn on Developer Mode and tap Restart.
  3. After the restart, unlock the phone and tap Turn On.
If Settings has no Developer Mode switch yet, it appears once setup installs the helper app, and Setup in Mobster for Mac asks again then. Developer Mode disabled has the message Xcode prints when it’s off.

Check it with mobster doctor

mobster doctor checks Xcode, the tools, whether the phone is connected and trusted, whether the helper app is installed, signed and answering, and whether the phone is locked:
Output
A ✗ line needs fixing, and a ! line is a warning. Each has its fix under it, after →.

Fix what doctor finds

mobster doctor --fix does the fix each finding carries, checks again, and prints what it did and what it couldn’t:
Output
The taps on the iPhone are yours: unlock it, plug it in, turn on Developer Mode, trust this Mac or the developer app, turn on UI Automation. --fix leaves them under the finding that names them. While Mobster for Mac or mobster serve runs, it manages the helper app itself, so --fix leaves the helper to it and says so. It also leaves alone a phone another Mobster is running a task on. Without a terminal, or with --json, --fix skips every question and lists each in fixes, with the finding’s cause, the kind of its fix and what happened (fixed, failed, refused, declined, needs_terminal or yours). Troubleshooting lists each message with its fix.

Keep the phone ready

  • Keep the phone unlocked. Mobster can’t read the screen while the phone is locked, and never enters a passcode.
  • Turn on a Focus mode before long runs, so a notification doesn’t take the foreground in the middle of a task.
  • A free Apple Account’s signature lasts 7 days. From day 5, Mobster rebuilds the helper app by itself (Keep the helper app running), and mobster doctor says how many days are left.
  • One Mobster process controls a phone at a time. While one holds the phone, Mobster refuses a second mobster serve, mobster run --execute or terminal UI, and mobster doctor shows “In use”. In Mobster for Mac and mobster serve, a second task for a phone in use waits in line (Share a phone between tasks).

Set up a simulator

mobster sim prepare creates a simulator Mobster manages, boots it headless, builds WebDriverAgent once and starts it on its own port. Then name it from mobster devices:
--simulator skips the USB, Xcode and helper app checks. For a simulator you run WebDriverAgent on yourself, pass its address with --wda-url. Simulators has the details.

Script the setup

mobster serve --manage-device owns the USB iPhone. It finds Xcode and your Apple development teams, builds the helper app for the connected phone into the Mobster data folder (~/Library/Application Support/app.mobster.desktop), then runs and supervises it with the USB relay. Mobster for Mac runs this same server. If Mobster for Mac is set up and running, skip this section: the helper app already answers at 127.0.0.1:8100. Start the server, then read the API token from the file named on its first line:
With several phones connected, choose one first with setup /phone '{"udid": "<UDID>"}'. The UDIDs are in setup | jq .devices, and a build belongs to the phone it was made for. With MOBSTER_QUEUE_PREFLIGHT=1, setup has a Photos step (the content queue’s iPhone checks). Mobster for Mac’s session sends it with setup /photos '{}', and you answer iOS’s question on the iPhone. The step says done once the iPhone allows Photos (Limit Access counts), and never holds back complete. Leave serve running while you use Mobster. It keeps the helper alive and restarts it if it stops. Then, in another terminal, run mobster doctor, then mobster.

How Mobster reaches the iPhone

Mobster drives an iPhone through WebDriverAgent, an XCTest runner that Xcode builds and installs on the phone. Setup and mobster doctor call it the helper app. It serves the phone’s accessibility tree and accepts taps and typing over HTTP. On a USB iPhone, iproxy relays that HTTP port to 127.0.0.1:8100 on your Mac. Mobster for Mac includes its own iPhone connection tools (libimobiledevice and iproxy). Any other copy of mobster gets them from Homebrew: when they’re missing, mobster setup prints brew install libimobiledevice.
WebDriverAgent has no authentication. Mobster binds it to 127.0.0.1 on the Mac. Keep it that way.
MOBSTER_CAPTURE_GATE=on in the environment that runs Mobster starts iPhone helpers with the capture gate that simulators run with. iPhone helpers start without it.

Without Xcode (paid team)

Set MOBSTER_EXPERIMENTAL_NO_XCODE=1 in your shell or your settings file to set up an iPhone from a Mac with no Xcode, on a team that pays for the Apple Developer Program. A free Apple Account keeps the Xcode path above, with its 7-day signature. Mobster signs the helper app on your Mac with codesign, using a development certificate and a provisioning profile that your own team makes through Apple’s App Store Connect API. It then installs and starts the helper with pymobiledevice3 (or go-ios). xcodebuild and xcrun never run.

What you need without Xcode

  • An App Store Connect API key with the Admin or Developer role, in your Keychain: mobster asc key add --key-id KEY_ID --issuer-id ISSUER_ID --p8 AuthKey_KEY_ID.p8.
  • pymobiledevice3 (GPL-3.0-or-later), which you install yourself with pipx install pymobiledevice3. Mobster runs it as a separate program and never bundles it. It looks on your PATH, in pipx’s folder (PIPX_BIN_DIR, else ~/.local/bin), /opt/homebrew/bin and /usr/local/bin. go-ios (MIT) works as the fallback.
  • A prebuilt helper app that matches this install of Mobster. Mobster for Mac carries one. From a checkout, MOBSTER_PREBUILT_RUNNER names a folder with WebDriverAgentRunner-Runner.app and a patches.txt.
  • An App ID for the helper on your team. Xcode makes a wildcard App ID that covers it the first time it builds for the team. Mobster doesn’t register App IDs, so if your team has none, the card says where to add one.

What Mobster sends to Apple

Setup shows a card before anything is sent, and mobster signing card prints the same card. It lists only the requests still needed, each exactly as it will be sent:
  1. Register your iPhone: its name and UDID, once per phone and team.
  2. Create a development certificate from a request made on this Mac. The private key stays in a dedicated Mobster keychain on this Mac.
  3. Create a development profile for the helper’s App ID, listing the certificate and every phone. Adding a phone makes a new profile that lists them all.
Nothing else is written to Apple. You approve the card by its digest:
Each request is recorded on your Mac before it is sent. If Mobster sends one and never sees Apple’s answer, it doesn’t send it again. mobster signing status lists it, and after you look at developer.apple.com, mobster signing resolve DIGEST --made or --not-made records what you found. Privacy lists the writes and what each carries.

What happens next

  1. Mobster signs a copy of the prebuilt helper with the profile, then checks the signature, the team, the bundle id and the profile.
  2. If the iPhone has no developer disk image mounted, pymobiledevice3 mounts one, as Xcode does the first time it prepares a phone. It downloads the image from GitHub and asks Apple’s signing service to personalize it for your iPhone.
  3. Mobster installs the signed helper and starts it, with the same readiness checks as with Xcode.
Developer Mode is still yours to turn on. If Settings › Privacy & Security has no Developer Mode switch, Setup’s Show the switch makes it appear.

Sign once, run on every Mac

A Mac with the key exports the signed helper and its profile, and a Mac with neither the key nor Xcode installs it:
The import opens the file only if it comes from the team you name, its files are intact, its signature verifies, it matches this install of Mobster, and its profile lists this iPhone with more than a day left. Name the team you expect, since any team’s signature verifies. The helper runs only on the iPhones its profile lists, until the profile ends.