iOS Testing Without Compromises | QA Wolf

Key takeaways

Until now, there's been no good way to automate test cases for iOS camera, microphone, or barcode scanner features: you could pay for manual QA, skip the coverage, or build fragile workarounds that break as often as they catch bugs. Our customers wanted none of those options. They wanted the same reliable, automated coverage on iOS that they already had on the web.

The solution starts inside the app itself.

Why iOS is hard to test

Mobile operating systems are built around curated app distribution models, which guarantee that software is trustworthy before it reaches users—rightly so. But that trust model makes it difficult for testers to control what an app sees, which is exactly what automation tools need to do.

Android app teams have more a few more options—the OS exposes runtime hooks that testing tools can use, and real-device limitations are less severe than on iOS. iOS provides none of that. There's no supported way to simulate hardware sensors—camera, microphone, or anything else the app might access. The security model that locks out attackers also locks out testers. For testing teams, this creates a hard ceiling.

How we solve it

Our approach solves the iOS testing problem with two components: the instrumentation library, which lives inside the app, and the iOS agent, which lives alongside it on the device. Note that these capabilities run only in dedicated automation builds on QA Wolf-managed devices. They are not included in the customer’s App Store or TestFlight builds.

#1: The instrumentation library

The Objective-C runtime offers a path that doesn't require hardware access at all: method swizzling. Our instrumentation library uses it to replace the app's calls to iOS APIs with its own implementations—so when the app requests camera data, it receives exactly what the test specifies instead. The library is injected into the app at install time when we resign it with custom certificates.

#2: The iOS agent

The iOS agent is built on WebDriverAgent and extended with additional device-control capabilities beyond standard Appium flows. It lives alongside the app on the device rather than inside it, and handles everything the instrumentation library doesn't. On the camera side, it streams the device screen in real time and manages the device's photo library. On the audio side, it records speaker output, downloads recordings, and calculates audio fingerprints for automated assertions.

Installing the components

Getting the instrumentation library onto the device follows one of two paths. By default, we inject it when we resign the app. For customers with signing restrictions, we can turn off resigning on a per-capability basis, allowing them to inject the library via their own CI/CD pipeline instead.

What you can test now

Camera. Inject a photo or video directly into the app's camera feed. The app sees exactly what the test specifies—a still image, a looping video—and can't distinguish it from a real camera. Tests that previously required a physical setup or a human holding something in front of a lens now run the same way every time.

Read more → Camera injection · Video injection · Photo library management

Barcode and QR codes. Inject barcode and QR code data directly into the scanning pipeline—no physical code, no camera setup required. Works with Apple's built-in scanning and third-party libraries such as ZXing and Google ML Kit, and supports all major 1D and 2D formats.

Read more → Barcode and QR code scanning Microphone. Inject a known audio file directly into the app's microphone input—the app receives exactly what the test specifies instead of live audio.

Read more → Audio injection

Speaker. Record the device's speaker output and compare it against a reference using audio fingerprinting. The Chromaprint algorithm handles small differences in volume or encoding without failing the assertion.

Read more → Audio capture

Frequently asked questions