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
- In Mobster for Mac
- In a terminal
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).
- Plug in the iPhone, unlock it and tap Trust.
- Mobster installs the helper app on the iPhone, signed with the Apple Account in Xcode.
- On the iPhone, open Settings › Privacy & Security › Developer Mode, turn it on and restart. iOS shows the switch once the install has started.
- Choose Allow so Mobster can tap and type.
Trust this Mac
The first time you plug the iPhone into this Mac, iOS asks whether to trust it.- Unlock the iPhone.
- Tap Trust.
- Enter your passcode. Mobster never enters it.
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.- On the iPhone, open Settings › Privacy & Security › Developer Mode.
- Turn on Developer Mode and tap Restart.
- After the restart, unlock the phone and tap Turn On.
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
✗ 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 doctorsays 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 --executeor terminal UI, andmobster doctorshows “In use”. In Mobster for Mac andmobster 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 andmobster 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.
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)
SetMOBSTER_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 withpipx install pymobiledevice3. Mobster runs it as a separate program and never bundles it. It looks on yourPATH, in pipx’s folder (PIPX_BIN_DIR, else~/.local/bin),/opt/homebrew/binand/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_RUNNERnames a folder withWebDriverAgentRunner-Runner.appand apatches.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, andmobster signing card prints the same card. It lists only the requests still needed, each exactly as it will be sent:
- Register your iPhone: its name and UDID, once per phone and team.
- Create a development certificate from a request made on this Mac. The private key stays in a dedicated Mobster keychain on this Mac.
- 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.
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
- Mobster signs a copy of the prebuilt helper with the profile, then checks the signature, the team, the bundle id and the profile.
- If the iPhone has no developer disk image mounted,
pymobiledevice3mounts 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. - Mobster installs the signed helper and starts it, with the same readiness checks as with Xcode.