auto watches for USB iPhones. For each phone, it runs the same preparation as setup without prompts, verifies readiness, and starts a cloud or local portal. It keeps handling phones that you connect later.
Start with a prepared phone
- Complete Connect an iPhone, including host trust and Developer Mode.
- Stop any portal that serves the phone.
- Log in with
mobilerun-ios login, or exportMOBILERUN_IOS_TOKENwith an API key. - Start
mobilerun-ios autoand connect the phone over USB. - Wait for the
automatic device readylog line. Then check that the phone is online in the dashboard, and run a task.
auto needs signing configuration only to install a missing runner.
auto runs in the foreground. Leave it running, or run it under your host’s service manager. Stop it with Ctrl+C or SIGTERM, and let it finish cleaning up. It has no --detach flag, and mobilerun-ios stop does not stop it.
Configuration
auto reads the configuration file and environment once at startup. Restart it after you change credentials, Wi-Fi, or signing settings.
To let auto install a missing WDA runner, configure one of these:
- App Store Connect:
signing.backend: asc,signing.account, andsigning.accounts. See App Store Connect. - Xcode:
signing.backend: xcodeandsigning.identity, on a Mac whose login keychain is unlocked. See Unattended Xcode signing. - Pre-signed runner:
wda.signed_url, with nosigning.*selection. See Pre-signed runners.
auto has none of setup’s --backend, --account, --identity, --wda, or --reinstall flags. Use the YAML keys for signing. To force a control mode, set MOBILERUN_IOS_REMOTE_XPC_ONLY. Otherwise each phone uses its saved or default mode.
Auto-Lock
In WDA mode,auto sets Settings → Display & Brightness → Auto-Lock to Never before it declares a phone ready. It reads the setting back and skips the change if it is already correct. If the setting cannot be changed, readiness fails. The steps expect English Settings, and a device policy can block Never.
In native mode, auto leaves Auto-Lock alone. Turning it off is optional: a locked phone still streams, and you can unlock it through the stream or API. To set Never anyway, run:
Factory-state phones
When a phone is clearly still in Setup Assistant,auto prepares it without erasing it. It activates and supervises the phone, installs the fleet profile, completes Setup Assistant, and then continues with the normal preparation. This needs:
profile.wifi.ssidandprofile.wifi.password, for a protected network with internet access.supervision_certand the matchingsupervision_key, from your device-management process.- The
reset_org_name,reset_locale, andreset_langvalues you want. Despite the names, these settings do not erase anything. - Signing configuration or
wda.signed_url, if the phone will use WDA.
auto does not treat the phone as factory-state. A phone that has finished Setup Assistant is served normally even if this configuration is missing.
Progress is saved under ~/.mobilerun-ios/onboarding/. If auto stops part-way, the next auto or setup run continues the same onboarding. Keep the same profile: and supervision settings until it has finished.
Activation Lock, management by another organization, host trust, developer trust, and the Developer Mode confirmation remain your responsibility. When auto blocks a phone, follow the action in the log.
Flags
Global flags:
--log-level, --verbose / -v, and --tunnel-mode. auto does not accept the root command’s video and audio flags. Use their environment variables.
Retries do not end auto
The--retry-* flags limit reconnects within one serving cycle. When they run out, auto rebuilds that phone’s portal and keeps going. Preparation errors are retried too, with a delay that grows from 1 second to 30 seconds. Running out of retries does not stop auto or abandon the phone.
A phone that needs you to act on it is parked instead of retried. Fix the condition on the phone, then disconnect it and connect it again while auto keeps running. For host configuration changes, restart auto. A parked phone does not block the others.
Local ports
A phone keeps its local port while it reconnects. After a phone disconnects, its port can go to another phone, so do not treat a port as a fixed mapping to a UDID. Read the readiness log line for each phone’s address.auto does not take over a port that another process is using.
Recovery
auto keeps installed runners and mounted images. It does not upgrade WDA or renew expired signing. Repair a phone with setup, then let auto serve it again.
A ready phone is not proof that every stream and API feature works on every iPhone. Test a real cloud task and the browser stream on your phones, especially with native control or a different tunnel layout.