mobilerun-ios runs on the host that your iPhone is connected to. It prepares the phone, then gives Mobilerun cloud control of its screen and input. It can also serve a local HTTP portal instead.
This reference covers mobilerun-ios v0.5.0. Check your version with mobilerun-ios --version, and a command’s options with mobilerun-ios <command> --help. For your first phone, follow Connect an iPhone.
Upgrading from v0.4.x? Signing and runner settings have new names, and the old ones are ignored. Read Migrate to v0.5.0 first.
Requirements
- Host: macOS, or Linux with
usbmuxd. Xcode signing needs macOS. App Store Connect signing and native control also work on Linux. - iPhone: iOS 16 or later. iOS 16 to 26 use WDA. iOS 27 and later can also use native control.
- FFmpeg 8, for native audio, recordings, and the H.264 browser fallback. Homebrew installs
ffmpeg@8with the CLI. The installer adds it when Homebrew is available.
Choose a workflow
Setup and verification
What setup does, its flags, control modes, and readiness checks.
WDA signing
Xcode and App Store Connect signing, and how to renew it.
Configuration
Every config.yaml key, environment overrides, and runtime tuning.
Automatic onboarding
USB discovery, concurrency, factory-state onboarding, and recovery.
Connect and operate
<udid> with the identifier from list. setup does not log in or connect to the cloud. A passing verify shows that the prerequisites are in place; it does not prove that cloud streaming works. Check that the phone is online in the dashboard, and run a task.
Background portals
~/.mobilerun-ios/portals/. stop without a UDID stops all detached portals. Stop foreground sessions, including auto, with Ctrl+C or SIGTERM.
Reconnects
When the cloud connection drops, the portal reconnects with exponential backoff. Foreground portals allow five attempts per serving cycle, and detached portals allow up to 30 minutes. Change this with--retry-attempts, --retry-duration, --retry-base-delay, and --retry-max-delay. A value of 0 for attempts or duration removes that limit.
When a cycle runs out of attempts, the CLI rebuilds that phone’s portal, with a delay from 5 seconds up to 5 minutes. The other phones keep running. Authentication failures stop the phone instead, because retrying cannot fix them. Run whoami, log in again, or replace the API key.
Local HTTP portal
Authorization: Bearer <token>. This endpoint controls the phone. Keep it on a trusted network and never expose it to the internet.
WDA and native control
mobilerun-ios controls a phone in one of two modes:
- WDA: WebDriverAgent, a test runner signed for your Apple team, runs on the phone. It works on iOS 16 and later, and supports every feature. Setup signs and installs it for you.
- Native: on iOS 27 and later, the CLI uses Apple’s built-in developer services. Nothing is installed on the phone, so no signing is needed.
- Below iOS 27: WDA.
- iOS 27 and later: native, unless a runner is already installed. To select WDA, run
mobilerun-ios setup <udid> --wda.
/mobilerun app folder. Native mode streams even while the phone is locked, so Auto-Lock can stay on.
Native video needs a privileged tunnel process. Run only the tunnel with sudo. Run the portal as your normal user, so it uses your login and configuration:
Terminal 1
Terminal 2
Other commands
Run
mobilerun-ios --help for the full list.