Run Maestro UI tests on real iOS devices — iPhone and iPad physical device testing with XCTest driver and automatic port forwarding.
⚠️ Unofficial Community Tool This is not affiliated with or endorsed by mobile.dev or the Maestro project. It's a community-built stop-gap until PR #2856 is merged.
Built by DeviceLab — stop renting devices you already own.
- Features
- Compatibility
- Requirements
- Installation
- Usage
- How It Works
- Limitations
- Troubleshooting
- Contributing
- License
- Patches your existing Maestro installation with real device support
- Builds and runs the XCTest driver on your iOS device
- Sets up port forwarding so Maestro can communicate with the device
| Maestro Version | Status |
|---|---|
| 2.0.10 | ✅ Supported |
| 2.0.9 | ✅ Supported |
| Other 2.x | ❌ Not tested |
| 1.x | ❌ Not supported |
Note: We build patches against specific Maestro releases. Using unsupported versions may cause issues.
- macOS
- Maestro 2.x installed
- Xcode with command line tools
- Apple Developer account (free or paid)
- iOS device connected via USB
curl -fsSL https://raw.githubusercontent.com/devicelab-dev/maestro-ios-device/main/setup.sh | bashThis will:
- Download the
maestro-ios-devicebinary - Download patched JARs and iOS runner
- Backup your current Maestro installation
- Patch Maestro with real device support
maestro-ios-device --versionKeep this running in a terminal:
maestro-ios-device --team-id YOUR_TEAM_ID --device DEVICE_UDIDIn another terminal:
maestro --driver-host-port 6001 --device DEVICE_UDID --app-file /path/to/app.ipa test flow.yaml# List available teams
security find-identity -v -p codesigning | grep "Developer"Or in Xcode: Xcode → Settings → Accounts → Select Team → Team ID
# List connected devices
xcrun xctrace list devicesOr in Finder: Select your iPhone → Click device name to reveal UDID
| Flag | Description |
|---|---|
--team-id |
Apple Developer Team ID (required) |
--device |
Device UDID (required) |
--driver-host-port |
Local port (default: auto from 6001) |
--uninstall |
Restore original Maestro installation |
--version |
Show version |
--help |
Show help |
┌─────────────┐ ┌──────────────────┐ ┌─────────────┐
│ Maestro │────▶│ maestro-ios-device│────▶│ iOS Device │
│ (patched) │ │ (port forward) │ │ (XCTest) │
└─────────────┘ └──────────────────┘ └─────────────┘
:6001 :22087
- maestro-ios-device builds and installs the XCTest runner on your device
- The runner starts an HTTP server on device port 22087
- Port forwarding connects localhost:6001 → device:22087
- Patched Maestro sends commands via
--driver-host-port 6001
Some commands have limited support on real iOS devices due to iOS restrictions:
| Command | Status | Notes |
|---|---|---|
clearState |
✅ Works | Reinstalls app (requires --app-file) |
setLocation |
Requires additional setup | |
addMedia |
❌ Not supported | iOS restriction |
Note: The
--app-fileflag is required for real device testing.
Restore your original Maestro installation:
maestro-ios-device --uninstallOr manually:
cp ~/.maestro/backup/* ~/.maestro/lib/This tool is temporary. Once PR #2856 is merged:
- Run
maestro-ios-device --uninstall - Update Maestro:
brew upgrade maestro - Use official iOS device support
We'll update this README when official support lands.
On your iOS device: Settings → General → VPN & Device Management → Trust your developer certificate
- Ensure Xcode command line tools are installed:
xcode-select --install - Open Xcode at least once to accept the license
- Check that your Apple Developer account is signed in
- Ensure device is connected via USB
- Trust the computer on your device when prompted
- Try
xcrun xctrace list devicesto verify connection
# Find process using port 6001
lsof -i :6001
# Use a different port
maestro-ios-device --team-id YOUR_TEAM_ID --device DEVICE_UDID --driver-host-port 6002- Ensure your device is running iOS 15+
- Check Xcode logs: Window → Devices and Simulators → View Device Logs
Issues and PRs welcome at GitHub.
Apache 2.0 (same as Maestro)
This project is not affiliated with, endorsed by, or connected to mobile.dev or the official Maestro project.
This tool patches your existing Maestro installation to add functionality not yet available in the official release.
Use at your own risk. We recommend switching to official Maestro once iOS device support is released.