How To Test Real iOS Devices with Appium - Part 2

April 30, 2026 · 12 min read · Mobile Testing

HeadSpin Platform
Automated & amp; manual examination made easy through information skill insights.
Differentiating capabilities:
  • Panoptic end-to-end mechanization of QA process
  • Comparative analysis of app execution against peer
  • Continuous monitoring of app performance habituate synthetic data for higher availability of apps
  • Easy-to-use developer friendly platform
cloudtest go
Affordable Real Device Testing for Emerging Teams
cloudtest go
Affordable Existent Device Testing for Digital Enterprises
cloudtest go
The Ultimate Solution for a Powerful Blend of Functional & amp; Performance Testing!
cyol
TEM
New
Centralized mobile test execution in cloud
cyol
Enhance Your Accessibility Testing With HeadSpin
cyol
Automate camera-based examination

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

retail

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

How To Test Real iOS Devices With Appium, Part 2How To Test Real iOS Devices With Appium, Part 2

How To Test Real iOS Devices with Appium - Part 2

Published on
October 31, 2018
Updated on
Published on
May 19, 2022
Updated on
 by 
 Jonathan LippsJonathan Lipps
Jonathan Lipps
This is the second in a 2-part serial on using existent iOS devices with Appium. It & # x27; s a tutorial on have started from lettuce, authored by Appium contributorJonah Stiennon. Assuming you & # x27; ve depart through all the setup instructions in the of this guide, we & # x27; ll now be able to put it all together in the pattern of genuine Appium scripts.

How Appium Automates Real iOS Devices

You don & # x27; t need to realise how Appium check iOS devices in order to run and write your tests, but I haven & # x27; t found a written explanation of this anywhere else, so am include it for those who are curious. To get started testing right away, omission to the next section, but if you & # x27; re wondering why we & # x27; ve had to install some of the things we need, read on.

of any device relies upon the ability to launch an app and have another program inspect and interact with what the app displays on the blind. iOS is very strict about security and works hard to prevent one app from looking at what is going on in another app. In order to cater this necessary feature for testing apps, Apple built the XCUITest framework. The way it works is that Xcode has the ability to establish a special app called an & quot; XCUITest-Runner & quot; app. The XCUITest-Runner app has access to a special set of system functions which can seem at the user interface ingredient of another app and interact with them. These especial use are called the XCUITest API, and sparse documentation for them can be foundhere. (For the rest of this account, we & # x27; ll refer to the app we are trying to test as the & quot; app under test & quot; or AUT, and the XCUITest-Runner app as the & quot; runner app & quot;.)

When pass tests, Xcode installs both the AUT and the runner app on the device. The runner app is a especial package which include the actual tests we wrote, and the name of the AUT. Xcode tells the device to launch the runner app, and the runner app establish the AUT. From this point forward, both the runner app and the AUT are active on the twist. The runner app is invisible and work in the ground, while the AUT is displayed on screen.

After the AUT launches, the smuggler app goes through its list of trial and runs each test, looking at the user interface of the AUT and tapping, swiping, typing into it, etc ... It make this using the peculiar XCUITest API functions.

Pro tip: Tools like SUSA can handle this autonomously — upload your app and get results without writing a single test script.

UI trial are usually compiled into the runner app which is loaded onto the twist, but Appium needs to be able to moderate the device as you send dictation to it, rather than postdate a predetermined script. What we need is a test which can becomeanytest, kinda than following a appointed set of user actions. Some bright minds at Facebook came up with a way to do this and published a peculiar exam callWebDriverAgent(or WDA). Essentially, WDA is a contrabandist app which opens a connector to the outside macrocosm and wait for commands to be sent to it, calling the relevant XCUITest API methods for each command. The creators of WDA chose to use the eponymous WebDriver protocol for the format of these bid, the same protocol that Appium already uses for its examination commands.

When your Appium tests run, they are using an Appium client to direct WebDriver dictation to the Appium server. The Appium server installs both your app and WDA on the iOS device, waits for WDA to start, then forward your trial bid to WDA. WDA in turn executes XCUITest API functions on the device, corresponding to the bidding it receives from the Appium server. In this way, we are able to arbitrarily interact with the user interface of an iOS device.

Accelerate Appium test cycles with the HeadSpin..

Whenever you see a reference toWDA in the Appium log, this is referring to WebDriverAgent running on the device.

The Capabilities

We have the app lam on our device, now let & # x27; s compose a uncomplicated automated examination which will establish our app and face for a particular set of words on the screen. Because all of our Apple setup has be done (hopefully) aright, all that we need to do from the Appium side of things is use the right set of capabilities:

DesiredCapabilities capabilities = new DesiredCapabilities (); capabilities.setCapability (`` platformName '', `` iOS ''); capabilities.setCapability (`` platformVersion '', `` 12.0.1 ''); capabilities.setCapability (`` deviceName '', `` iPhone 8 ''); capabilities.setCapability (`` udid '', `` auto ''); capabilities.setCapability (`` bundleId '', ````); capabilities.setCapability (`` xcodeOrgId '', ````); capabilities.setCapability (`` xcodeSigningId '', `` iPhone Developer ''); capabilities.setCapability (`` updatedWDABundleId '', ``");

The trick here is knowing how to occupy all of these out!

  • platformName is iOS(as you would no doubt expect)
  • platformVersionis the version of iOS our app is running, 12.0.1in my example.
  • deviceNamedoes not actually thing for us, since we have plugged in a real device and will select that gimmick using theudiddesired capability. Appium yet involve us to supply a value fordeviceName, though, so I putiPhone 8.
  • udidis the unique ID of the device we want to run our test on. We could find our device udid by running the commandcat's-paw -s devicesin the terminal, but since we alone have a single twist punch in, we can put auto and Appium will automatically find theudid of the gimmick for us and use it.
  • bundleIdis the special iOS-internal gens of our app, which is set in the same app-settings form where we selected our Team in Xcode. It is a unique way of identifying any app. In my case it island.stiennon.jonah-test-app, but you should put in a value that is right for your app ..
  • xcodeOrgIdis the & quot; Organizational Unit & quot; value we make a note of earlier. It is the ID of the Developer Team which ratify the certificate used to make the app.
  • xcodeSigningIdis the first piece of the & quot; Common Name & quot; associated with the developer certificate. Since Xcode set this up for us, it is most alwaysiPhone Developerbut could be something different for you if you are automating a different iOS device.
  • updatedWDABundleIdis used by Appium to trick your gimmick into allowing Appium to establish WDA on it. You might have inquire, given how many basketball you had to jump through to getyourapp running on a device, how Appium is able to getWDAon the device. The short solution is that, typically, it can & # x27; t. WDA & # x27; s wad ID(com.facebook.webdriveragent) will not demo up as an App ID in any of your provisioning profiles, so the app would not be allowed to run on your device. But given that Appium has the WDA code, it can actually change the bundle ID on the fly, so that when WDA is built and signed it will be permit past Apple & # x27; s security restrictions. What this entail is that you must render a bundle ID value that is allowed by an App ID in your provisioning profile. We typically advocate use wildcard App IDs (likecom.test. *), so that we can give a new bundle ID to WDA ofcom.test.webdriveragent. You could besides give it the like bundle ID as your app, but that could stimulate some muddiness in the system later on. If you choose, you can omit this capacity and simply open up the WDA project inside of Appium, and make all these modifications yourself using Xcode.
Remotely tryout and debug mobile, web, audio and video application on thou of iOS device around the world..

The Test

Your actual test code, of course, is up to you to define! You & # x27; ll simply instantiate a Driver and run your test as in any other case. All the heavy lifting is do by Appium in response to the capabilities above and in the context of correctly-signed apps and correctly-provisioned devices. Here & # x27; s a step-by-step guide of what to do:

  1. Start the Appium server (by opening the Appium Desktop app or apply the CLI).
  2. Run the Java tryout you wrote include the capabilities above, and watch as the iOS device open your app!
  3. Make sure the device is unlocked, and if it ask you to & quot; Trust the Computer & quot;, tap the button to trust our Mac. You & # x27; ll need to do this the first clip.
  4. If anything move wrong, control the logs which Appium prints. There is about how to read these logs.

Note that thebundleId capacity can only be use for apps which are already installed on our iOS device. We installed our app manually using Xcode, so the app is already there. If we get changes to the app code, we will feature to click thebutton in Xcode in order to install the latest variant of our code on the device. Then we can run our Appium tests again.

Alternatively, we could use theapp capability and set it to the path of an.ipafile on disk. This must be an app archive generated in Xcode and ratify correctly.

As a full (not act) example, see below (or tick through to thecodification sampling on GitHub). It & # x27; s not working because of course you & # x27; ll need to provide the correct value foryourapp. But you can use it as a template.

import io.appium.java_client.ios.IOSDriver; import java.net.MalformedURLException; import java.net.URL; significance org.junit.After; importation org.junit.Before; import org.junit.Test; import org.openqa.selenium.remote.DesiredCapabilities; public class Edition041_iOS_Real_Device {private IOSDriver driver; @ Before public void setUp () drop MalformedURLException {DesiredCapabilities capabilities = new DesiredCapabilities (); capabilities.setCapability (`` platformName '', `` iOS ''); capabilities.setCapability (`` platformVersion '', `` 12.0.1 ''); capabilities.setCapability (`` deviceName '', `` iPhone 8 ''); capabilities.setCapability (`` udid '', `` auto ''); capabilities.setCapability (`` bundleId '', ````); capabilities.setCapability (`` xcodeOrgId '', ````); capabilities.setCapability (`` xcodeSigningId '', `` iPhone Developer ''); capabilities.setCapability (`` updatedWDABundleId '', ````); driver = new IOSDriver < > (new URL (`` http: //localhost:4723/wd/hub ''), capabilities);} @ After public void tearDown () {if (driver! = null) {driver.quit ();}} @ Test world vacuum testFindingAnElement () {driver.findElementByAccessibilityId (`` Login Screen '');}}
Author & # x27; s Profile

Jonathan Lipps

LinkedIn
Author & # x27; s Profile

Piali Mazumdar

Lead, Content Marketing, HeadSpin Inc.

Piali is a dynamic and results-driven Content Marketing Specialist with 8+ years of experience in crafting engaging narratives and marketing collateral across divers manufacture. She excels in collaborate with cross-functional teams to germinate innovative content strategies and deliver compelling, veritable, and impactful content that vibrate with target audiences and enhances make authenticity.

LinkedIn

How To Test Existent iOS Devices with Appium - Part 2

4 Parts

regression intelligence blog
-

Regression Intelligence practical guidebook for advanced users (Part 3)

Coming Soon
Regression Intelligence practical guide for advanced users
-

Regression Intelligence virtual usher for advanced users (Part 4)

Coming Soon

Discover how HeadSpin can empower your concern with superior testing capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitive edge
faster development cycles
Boost developer/QA productivity with faster growth cycles
automated buil-over-build regression testing
Automate build-over-build regression test for consistent results
gain better visibility into functional & performance issues
Gain better profile into functional and execution subject
reduce mean time
Reduce mean time to identify/resolve during trial, QA, and production
evaluate audio, video & qoe
Evaluate audio, video, and content caliber of experience (QoE) effortlessly
The trusted choice for world enterprises
Adobe
Hargreaves Lansdown
Truecaller
Crazylabs
Nedbank
Numeracle
Veryon
Close

Discover how HeadSpin can authorise your business with superior essay capability

Our Platform enable you to:
accelerate time-to-market
Accelerate time-to-market, gain a militant edge
faster development cycles
Boost developer/QA productivity with faster development rhythm
automated buil-over-build regression testing
Automate build-over-build fixation testing for consistent results
gain better visibility into functional & performance issues
Gain better visibleness into functional and performance issues
reduce mean time
Reduce base time to identify/resolve during test, QA, and product
evaluate audio, video & qoe
Evaluate audio, video, and content quality of experience (QoE) effortlessly
The sure alternative for world enterprises
Close

Discover how HeadSpin can endue your business with superior testing capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, win a competitive edge
faster development cycles
Boost developer/QA productivity with quicker ontogenesis cycles
automated buil-over-build regression testing
Automate build-over-build regression testing for coherent results
gain better visibility into functional & performance issues
Gain best visibleness into functional and performance issues
reduce mean time
Reduce mean time to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate audio, picture, and content calibre of experience (QoE) effortlessly
The trusted choice for global endeavour
Close

Connet Now

Wipro LogoVMLYR Logo
Close
Book a Meeting
Products
footer down arrow
Solutions
footer down arrow
Industries
footer down arrow
Features
footer down arrow
Support
footer down arrow
Resource Center
footer down arrow
Why Choose HeadSpin?
footer down arrow
Copyright © 2026 HeadSpin, Inc. All Rights Reserved.

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free