Provisioning Profile
The XCUITest driver communicates with the device under test through the
WebDriverAgentRunner-Runner (WDA) helper application, which the driver can automatically build and
install on the device. For real devices, Apple requires all apps to have a valid provisioning
profile before they can be installed, which means that the WDA app must first be signed and linked
to a development team. This guide describes how to accomplish this.
Apple Account¶
A key prerequisite for signing WDA is an Apple Account. Free and paid accounts are both supported. Note that there are two cases where you may not need an account:
- Your device already already has WDA installed
- You already have a prebuilt WDA on your local system
Once you have an Apple Account, there are several approaches you can take.
Automatic Configuration¶
The automatic configuration approach allows creating a provisioning profile without the need to configure WDA itself. However, it is only supported for paid Apple Developer accounts.
Read the full guide: Automatic Provisioning Profile Configuration
Manual Configuration¶
Free Apple Accounts are still able to sign WDA and link it to their default personal team. There are several ways of doing this, but all of them involve working with the WDA application, or more specifically, its Xcode project, which is installed alongside the XCUITest driver.
The driver includes a convenience script to automatically open the WDA project in Xcode:
The script will also print the full path to the project file, which you may want to use in later steps. The project file is located in the XCUITest driver install directory:
Once Xcode is open, make sure to add your Apple Account in the settings:
Xcode -> Settings -> Apple Accounts -> Add Apple Account...
Now you can configure the WDA project using one of the manual configuration approaches:
-
Basic configuration: create a new project, then use its provisioning profile and bundle ID
Read the full guide: Basic Manual Provisioning Profile Configuration
-
Full configuration: associate the provisioning profile directly with the WDA project
Read the full guide: Full Manual Provisioning Profile Configuration
-
Generic device configuration: manually run
xcodebuildto build WDA, then manually install itRead the full guide: Manual Provisioning Profile Configuration for a Generic Device
Common Issues¶
At this point you should have either tried to start a session with provisioning profile-related capabilities (for automatic config), or tried to build and install WDA through Xcode (for manual config). If this did not succeed, you likely have one of the following problems. For issues not listed here, please refer to the Troubleshooting page.
xcodebuild exited with code 65¶
This can happen during automatic configuration, or when a manually configured provisioning profile is revoked (for example, due to expiration). It means that code signing is not set up correctly and must be reconfigured. Follow the steps in any of the manual configuration approaches to fix this.
xcodebuild exited with code 70¶
Similarly to the error for code 65, this error can be caused by invalid code signing, but may
also be returned in case of invalid xcodebuild configuration (for example, wrong platform
version). To fix this, check if code signing is set up properly, and verify that any custom build
parameters have valid values.
Developer App Certificate is not trusted¶
This error can appear in Xcode when building WDA during manual configuration with a free Apple Account. A similar error will also appear if you manually try to open the WDA app on the device:

You can fix this by allowing your device to accept apps from your personal development team. Note that this requires the device to have an internet connection.
- On the device, open Settings -> General -> VPN & Device Management
- You should see a new Developer App section, listing the Apple Account email used to build WDA. Select it.
- Tap Trust {email} -> Allow
You can find additional information in the related Apple documentation guide.
Offline Provisioning Profile¶
Since iOS 16, Apple requires a device to have a live internet connection for validating the code signing. It is possible to set up an offline enabled provisioning profile, which allows you to avoid the limitation, although such profiles are only valid for up to 7 days. Please read this issue regarding detailed configuration steps.
Improve WebDriverAgent Startup Performance¶
Building WDA upon every session startup may add up to a significant amount of time. The driver
offers a few methods to speed this up, with or without using xcodebuild. Some approaches may
require a deeper understanding of the iOS development environment.