Skip to main content
This guide covers the one-time setup required to automate physical iOS devices connected via USB using WebDriverAgent (WDA).
Looking for other options? Check out the Local Quickstart for Android/iOS simulators or Cloud Mobile Quickstart for zero-setup cloud devices.
Make sure you’ve completed the Installation steps before proceeding.

What You’ll Need

macOS with Xcode

Required for code signing and building WDA

Physical iOS Device

iPhone or iPad connected via USB cable

Node.js & npm

For installing Appium and drivers

Apple Developer Account

Free account works - needed for code signing

One-Time Setup

1

Install Appium

Install Appium globally via npm:
2

Install XCUITest Driver

Install the XCUITest driver which includes WebDriverAgent:
This installs WebDriverAgent at: ~/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/.
3

Configure Code Signing

WebDriverAgent must be code-signed to run on physical devices. This is a one-time setup.
In Xcode:
  1. Open the Project Navigator (panel on the left), then select the WebDriverAgent project at the top.
  2. Select the WebDriverAgentRunner target (top-left dropdown)
  3. Go to Signing & Capabilities tab
  4. Check “Automatically manage signing”
  5. Select your Team (your Apple ID)
  6. Change the iOS Bundle Identifier to something unique:
    • Example: com.yourname.WebDriverAgentRunner
    • Must be unique across all Apple apps
    Don’t forget: Repeat the same steps for the WebDriverAgentLib and IntegrationApp targets.
  7. Select your physical device as the run destination in Xcode, then build the IntegrationApp target once. This will trigger the code-signing process and install the required provisioning profile on your device.

    Option B: Using CLI (Advanced)

If you prefer command-line signing:
You’ll still need to get your Team ID from Xcode or your Apple Developer account.
4

Trust Developer Certificate on Device

After the first WDA build, trust the developer certificate on your iOS device:
  1. On your device: Settings → General → VPN & Device Management
  2. Tap on your developer certificate (your Apple ID)
  3. Tap Trust
You only need to do this once per developer certificate.

Using Your Physical iOS Device

After the one-time setup, mobile-use handles everything automatically:
  • ✅ Starts iproxy for USB port forwarding
  • ✅ Builds and runs WebDriverAgent via xcodebuild
  • ✅ Connects to WDA and waits for it to be ready
  • ✅ Cleans up processes when your script exits

Basic Example

physical_device_demo.py
The agent automatically detects your connected iOS device. No UDID needed unless you have multiple devices connected!

Multiple Devices

If you have multiple devices connected, specify which one to use:
multiple_devices.py

Advanced Configuration

Managing WDA Externally

For debugging or custom setups, you can disable auto-start and manage iproxy/WDA manually:
manual_wda_setup.py
When auto-start is disabled, manually start the required processes:

How It Works

1

iproxy Port Forwarding

iproxy forwards USB traffic from device port 8100 to localhost:8100
2

WDA Build & Deploy

xcodebuild builds WDA (if needed) and deploys it to your device
3

WDA Server Running

WDA server runs on the device, listening on port 8100
4

Python Client Connection

Python client connects to localhost:8100 via iproxy
The WDA wrapper automatically manages iproxy and xcodebuild processes, cleaning them up when your script exits.

Getting Your Device UDID


Troubleshooting

Solution: Trust the developer certificate on your device
  1. Go to Settings → General → VPN & Device Management
  2. Tap on your developer certificate
  3. Tap Trust
Possible causes:
  • No Team selected in Xcode
  • Bundle Identifier conflict
  • Device not registered in Apple Developer account
Solutions:
  1. Open the WDA project in Xcode
  2. Verify a Team is selected for both targets
  3. Try a different Bundle Identifier (e.g., com.yourname.WebDriverAgentRunner)
  4. Check device registration in your Apple Developer account
Solution: Keep your device unlocked
  • Unlock your device before running automation
  • Keep it unlocked during the initial WDA build
  • Consider disabling auto-lock temporarily: Settings → Display & Brightness → Auto-Lock → Never
Debugging steps:
  1. First build takes time: Initial builds can take 1-2 minutes
  2. Check Xcode: Open the project in Xcode for detailed error messages
  3. Verify signing: Ensure code signing is configured for both WebDriverAgentRunner and WebDriverAgentLib targets
  4. Clean build: In Xcode, go to Product → Clean Build Folder
  5. Update Xcode: Make sure you’re running the latest version
Troubleshooting:
  1. Verify WDA is running on device (you should see the WDA screen)
  2. Check iproxy is running: ps aux | grep iproxy
  3. Test WDA manually: curl http://localhost:8100/status
  4. Restart your device and try again
  5. Increase timeout in config: wda_startup_timeout=180.0
For more troubleshooting help, check the Troubleshooting Guide or join our Discord community.

Next Steps

Explore Examples

Check out real-world automation examples

Learn Core Concepts

Understand tasks, profiles, and builders

Platform Integration

Add observability with Minitap Platform

SDK Reference

Dive into the complete API documentation