Skip to main content
device is a runtime proxy over the iOS simulator and device API. Use it for device-level operations — such as injecting camera or audio input, managing photos, recording audio, simulating network conditions, or installing configuration profiles — that sit outside app UI interactions. Use driver for interacting with the app itself. device is only available while a flow is running.

injectCamera

Replaces the app’s camera input with a provided image or video. Affects photo capture, video data output, video recording, and preview layers.
Returns a cleanup function that removes the injection config and media file.
Cannot be used simultaneously with injectAudio — they share the same config file.
Example:

injectAudio

Replaces the app’s microphone input with a provided audio file. Affects AVAudioRecorder and AVCaptureAudioDataOutput.
Returns a cleanup function that removes the injection config and audio file.
Cannot be used simultaneously with injectCamera — they share the same config file.
Example:

injectBarcode

Injects a barcode or QR code detection into the app’s AVCaptureMetadataOutput. The injected barcode is delivered to the app’s metadata output delegate as if scanned by the camera. The config file is auto-consumed after delivery.
Returns a cleanup function that removes the injection config. Example:

injectBeacon

Injects iBeacon detections into the app’s CLLocationManager. Always triggers a region-entry callback. When beacons is provided, also triggers ranging callbacks.
Returns a cleanup function that removes the injection config files. Example:

installConfigurationProfile

Installs a configuration profile on the iOS simulator or device. Returns a cleanup function that removes the profile when called.
Example:

setWebViewDebugging

Enables or disables WebView debugging (Safari Web Inspector) for all WKWebView instances in the app. When enabled, WKWebViews become inspectable via Safari DevTools. The default behavior is enabled.
Returns a cleanup function that removes the config file, reverting to the default (enabled). Example:

savePhoto

Saves an image file to the device’s Photos library.
Example:

listPhotos

Returns a list of all photo and video assets in the device’s Photos library.

deleteAllPhotos

Deletes all photos and videos from the device’s Photos library. Use this for test teardown to restore a clean state between runs.
Example:

startSpeakerRecording

Starts a recording session that captures audio output from the device speaker. Returns a session object with the ID needed to stop the recording.

stopSpeakerRecording

Stops an active speaker recording session. Also calculates the audio fingerprint automatically. Returns the recorded file details.

downloadSpeakerRecording

Downloads the recorded audio file as a Buffer in WAV format.
Example combining startSpeakerRecording, stopSpeakerRecording, and downloadSpeakerRecording:

calculateAudioFingerprint

Calculates an audio fingerprint from a WAV audio buffer or file path. Use this to compare recorded audio against a known reference without byte-for-byte comparison.

simulateNetworkCondition

Simulates a degraded network condition on the device. Returns a cleanup function that restores normal network conditions when called.
Built-in presets: Example:

getNetworkCondition

Returns the current network simulation state.

routeTraffic

Routes network traffic for specific apps or domains through a tunnel. Returns a cleanup function that restores default routing when called.
Example:

getNetworkStatus

Returns the current network routing status including VPN state, active tunnels, and routed apps.

subscribeNetworkLogs

Subscribes to real-time network log events streamed from the Appium plugin. Returns a subscription object with on() and close() methods.
Requires routeTraffic() to have been called first with inspect: true.
Example:
The RecordedEntry object contains the following fields:
Last modified on May 20, 2026