For automating iOS app tests, Appium uses XCTest or UI Automation (for older iOS versions):
- XCTest: You can use XCTest to create and run unit tests, performance tests, and UI tests for your iOS applications built for iOS 9.3 and higher. It integrates with Xcode's testing workflow for testing the iOS application. Appium internally uses XCTest for automating the iOS applications.
- UI Automation: For testing apps developed for iOS 9.3 and lower, you need to use UI Automation. Appium receives the commands from test scripts over the JSON wire protocol. Appium sends these commands to Apple Instruments so that they can be executed on the app that is launched in a simulator or real device. While doing so, Appium translates the JSON commands into UI Automation JavaScript commands that can be understood by the instruments. The instruments take care of launching and closing the app in the simulator or device.
Appium works as a Remote WebDriver and receives the commands from your test scripts over the JSON wire protocol. These commands are passed to XCTest or Apple Instruments to be executed on the app launched on a simulator or a real device. This process is shown in the following diagram:

After the command is executed against your app on the simulator or device, the target app sends the response to XCTest or UI Automation Instrument, which is transferred to Appium in the JavaScript response format. Appium translates the responses into Selenium WebDriver JSON wire protocol responses and sends them back to your test script.
The main advantages of using Appium for your iOS automation testing are as follows:
- It uses the iOS platform-supported XCTest or the UI Automation library and instruments provided by Apple itself.
- Even though you are using the JavaScript library, you, and a test-script developer, and your tests are not really tied to it. You can use your own Selenium WebDriver client-language bindings, such as Java, Ruby, or Python, to develop your test scripts. Appium will take care of translating them into JavaScript for you.
- You don't have to modify your native or hybrid apps for the purpose of testing.