Set Up Appium for Android and iOS Without Mixing Drivers

Pair UiAutomator2 with Android and XCUITest with iOS, then verify that each target is ready before opening a test session.

An Appium suite can share its language, assertions and reporting across Android and iOS. Each side still needs a driver and an accessible test device. Do the environment check separately, then connect both platforms to the same small acceptance test.

Two generic phones and a laptop used to illustrate cross-platform testing
Concept illustration of separate mobile test targets and a development computer.
TargetHost and toolsDriverFirst positive signal
Android emulator or Android test phoneAn Appium-supported host with Android SDK, Platform-Tools and a compatible Java setupUiAutomator2The chosen device is visible to ADB and the driver doctor reports no required fixes for your setup
iOS simulator or iPhone test devicemacOS with compatible Xcode. Check signing and real-device prerequisites separately.XCUITestA compatible simulator exists or the connected device is visible to Xcode, and Appium lists the XCUITest driver

Use the official Appium Android setup, the iOS driver requirements and Apple’s run instructions. Check host and driver version compatibility before installing packages. The checks below are setup instructions based on publisher documentation.

Verify the Android side

With Appium and the Android tooling set up on your host, install the driver and inspect your target.

appium driver install uiautomator2
appium driver doctor uiautomator2
adb devices -l

Fix an unauthorized or offline device before debugging a test. Where several targets are attached, carry the exact device serial into the capabilities with appium:udid. For an emulator you intend Appium to start, follow the driver documentation for the AVD capability. Keep appium:automationName as UiAutomator2.

Verify the iOS side

On the Mac that will host Appium, confirm the Xcode version and list the simulator targets before trying to start a session.

xcodebuild -version
xcrun simctl list devices booted
appium driver install xcuitest
appium driver list --installed

If the simulator list has no booted device, boot one in Xcode or Simulator and repeat the check. Set the iOS session’s appium:automationName to XCUITest. For a real iPhone, follow the driver’s requirements for WebDriverAgent signing, trust and device provisioning. A working simulator test does not establish real-device readiness.

Share the assertion, keep selectors platform-specific

One check, two drivers
  • Android path

    Start a UiAutomator2 session on your chosen device or emulator.

  • iOS path

    Start an XCUITest session on a supported Mac with Xcode.

  • Shared result

    Use each platform’s own selector to verify the same outcome.

In your own sample app, make an About button open a screen with a visible version label. Run it first on one platform. For the second platform, keep the same expected label and use the app’s platform-specific accessibility identifier. Store one result per device rather than combining the reports before both sessions have started.

When a session fails during creation, compare host tools, target and driver capabilities. When the session starts and only the assertion fails, inspect the actual accessibility hierarchy and verify the identifier, screen and locale. For a website, use a browser-based fixture that stays inside the DOM.