iOS Testing & Setup Guide
Automating native iOS applications requires specialized tooling and environment configurations due to Apple's security model. Robonito provides an automated, code-free testing engine for iOS apps running on Apple Silicon macOS hardware via the Appium XCUITest driver and Xcode Simulator.

Image Update Note: The Mobile Setup screenshot (
/mobile-testing/mobile-setup-macos.png) can be refreshed with a capture showing the latest Apple Silicon component checkmarks and Xcode Command Line Tools status.
Prerequisites & System Requirements
| Requirement | Specification | Why It Is Required |
|---|---|---|
| Operating System | macOS (Sonoma, Ventura, or later) | Apple iOS simulators run exclusively on macOS. Windows and Linux are not supported for iOS simulation. |
| Hardware | Apple Silicon (M1, M2, M3, M4, or Pro/Max/Ultra) | XCUITest simulator architectures are optimized for ARM64 Apple Silicon. |
| Xcode | Xcode 15 or later (from Mac App Store) | Provides the iOS Simulator runtime, SDK headers, and simctl CLI utilities. |
| Xcode CLI Tools | xcode-select --install | Command-line developer utilities required to compile WebDriverAgent (WDA). |
| Node.js Runtime | Managed by Robonito | Embedded runtime powering the local Appium server. |
| Appium & XCUITest Driver | Managed by Robonito | The automation driver that bridges Robonito's test steps with iOS accessibility APIs. |
One-Click Mobile Setup via Robonito
Robonito automates the entire installation and dependency verification process:
- Open Robonito and navigate to Environment Manager → Mobile Setup.
- Click Install All.
- Robonito detects your macOS environment and automatically installs:
- Isolated Node.js runtime
- Appium server
- XCUITest driver (for iOS simulation)
- UiAutomator2 driver (for Android emulation)
- WebDriverAgent (WDA) dependencies
- Once installation completes, all components will display a green INSTALLED badge.

Accepting the Xcode License Agreement
If you see an error indicating that the Xcode license has not been accepted, open Terminal on your Mac and run:
sudo xcodebuild -license accept
After accepting the agreement, return to Robonito and verify the status in Mobile Setup.
Simulator Builds vs. App Store Builds
Critical Build Requirement:
App Store distribution .ipa files and production Ad-Hoc builds are compiled for physical device hardware (arm64-iphoneos) and cannot run on the Xcode Simulator.
To test iOS apps on the simulator, ensure your iOS development team compiles a Simulator Build (x86_64 or arm64-iphonesimulator):
How Developers Generate a Simulator Build
From the command line in the iOS Xcode project directory:
xcodebuild -workspace YourApp.xcworkspace \
-scheme YourAppScheme \
-configuration Debug \
-sdk iphonesimulator \
-derivedDataPath build
This generates an application bundle (YourApp.app) inside build/Build/Products/Debug-iphonesimulator/. You can zip this .app into a .zip or .ipa archive and upload it directly into Robonito.
Creating and Recording an iOS Test Case
1. Initialize the Test Case
- In the Test Explorer, click + New Test Case.
- Select your mobile suite.
- Choose Mobile as the test type and iOS as the platform.
- Click Create.

2. Configure Launch Options
Click Record on the iOS test case. The launch modal opens:
- Application Build: Upload your simulator-compatible
.ipaor.app.zip. - Bundle Identifier: Enter the app's unique Bundle ID (e.g.,
com.company.storefront). Robonito uses this to launch the app directly. - Simulator Device: Select your desired iOS device profile (e.g., iPhone 15 Pro, iPhone 16, iPad Air).

3. Interactive Mirror & Live Recording
Click Start Recording. Robonito:
- Boots the selected iOS Simulator (or reuses a warm running simulator).
- Installs the app package onto the simulator.
- Launches WebDriverAgent (WDA) and connects the interactive screen mirror.
- Begins capturing your touch gestures, inputs, and validations.

Image Update Note: Update screenshot (
/mobile-testing/mobile-ios-timeline.png) showing live recorded steps with XCUITest locator badges and variable tokens.
iOS Locator Strategies & Best Practices
iOS uses the XCUITest accessibility hierarchy. Robonito evaluates locators in order of resilience:
| Locator Strategy | Example | Stability | Recommendation |
|---|---|---|---|
| Accessibility Identifier | accessibilityIdentifier="submit_order_btn" | 🥇 Highest | Best Practice: Ask developers to set accessibilityIdentifier in Swift/Objective-C/SwiftUI. Stable across translations and UI refactors. |
| Accessibility Label / Name | label="Proceed to Payment" | 🥈 High | User-facing text read by VoiceOver. Stable for static action buttons. |
| iOS Class Chain | **/XCUIElementTypeButton[name == "checkout"] | 🥉 Medium | Fast, targeted hierarchy traversal supported natively by XCUITest. |
| iOS Predicate String | name == 'login' AND visible == 1 | 🥉 Medium | Boolean property evaluation on XCUITest attributes. |
| XPath | //XCUIElementTypeButton[@name='Submit'] | ⚠️ Fallback | Slower and more fragile. Used only when unique accessibility identifiers are absent. |
SwiftUI & UIKit Accessibility Tip
In SwiftUI:
Button("Checkout") {
// action
}
.accessibilityIdentifier("checkout_button")
In UIKit:
checkoutButton.accessibilityIdentifier = "checkout_button"
iOS Gestures & Touch Interactions
Robonito translates desktop pointer actions into native XCUITest touch events:
- Tap (
mobile-tap): Direct tap on native iOS elements. - Long Press: Press and hold for contextual menus or drag states.
- Swipe & Scroll (
mobile-swipe): iOS momentum scrolling (Up, Down, Left, Right). - Edge Swipe (Back Navigation): Swipe right from the left edge of the screen to pop view controllers in navigation stacks.
- System Buttons (
mobile-system-button): Home button, Lock screen, or App Switcher.
Handling System Alerts & Biometric Dialogs
Native Permission Dialogs
iOS frequently prompts users with system alerts outside the app's DOM/hierarchy:
- "Allow [App] to use your location?"
- "Allow [App] to send you notifications?"
- "Allow [App] to access the Camera?"
When these alerts appear on the simulator mirror, tap Allow, Allow While Using App, or Don't Allow. Robonito records these interactions as system-level alert handler steps so automated playback never stalls waiting for user consent.

Image Update Note: Add screenshot (
/mobile-testing/ios-permission-alert.png) showing an iOS system alert on the device mirror with the recorded action node.
Biometric Simulation (Face ID / Touch ID)
Robonito supports automated biometric simulation on Xcode Simulators:
- In the test case editor, add an iOS Biometric step.
- Choose Match (Success) or Non-Match (Failure) to test biometric authentication and fallback PIN screens.
Simulating Geolocation on iOS
To test location-aware iOS applications:
- In the mobile recording toolbar, click the Geolocation pin icon.
- Enter target Latitude and Longitude coordinates.
- Robonito communicates with
xcrun simctl locationto simulate the device's location in real time. - A
mobile-geolocationstep is recorded into the test case for automated repeatability.
iOS Troubleshooting Guide
| Symptom | Cause | Remediation |
|---|---|---|
| "XCUITest driver not found" | Driver missing or path broken | Open Environment Manager → Mobile Setup and click Install All. |
| "Failed to install app on simulator" | Build is signed for physical hardware (arm64-iphoneos) | Rebuild the app targeting SDK=iphonesimulator. App Store builds cannot run in simulators. |
| "Xcode license not accepted" | Xcode update pending license agreement | Run sudo xcodebuild -license accept in Terminal. |
| "WebDriverAgent timed out" | Simulator or WDA runner stalled | Restart the simulator or run killall -9 com.apple.CoreSimulator.CoreSimulatorService. |
| Element taps miss their target | Resolution scaling mismatch | Ensure the test case device resolution matches the simulator profile. |
Next Steps
- Mobile Assertions Reference — Complete guide to element, text, attribute, and visual assertions.
- Android Testing Guide — Setup, ADB persistent channel, and Android locators.
- Execution Reports — Reviewing test logs, traces, and mobile failure screenshots.