IosDeviceBackend class

A paired physical iPhone driven like a hand would: real touches, keys and buttons through Xcode's Device Hub service, screenshots through devicectl.

Inheritance

Constructors

IosDeviceBackend({required String udid, required double devicePixelRatio, required double pixelWidth, required double pixelHeight, DeviceHid? hid, ProcessRunner run = boundedRun})

Properties

capabilities → BackendCapabilities
no setteroverride
devicePixelRatio → double
final
hashCode → int
The hash code for this object.
no setterinherited
hid → DeviceHid
final
label → String
no setteroverride
pixelHeight → double
final
pixelWidth → double
final
run → ProcessRunner
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
udid → String
final

Methods

close() → Future<void>
Releases helper processes this backend started.
override
edgeSwipe(ScreenEdge edge) → Future<void>
A system gesture from edge (back, home, app switcher, Control Center, Notification Center).
override
lockState() → Future<bool?>
Whether the device shows its lock screen; null when the backend cannot tell.
inherited
longPress({required int physicalX, required int physicalY, required int durationMs}) → Future<void>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pinch({required int physicalX, required int physicalY, required double scale, int durationMs = 400}) → Future<void>
Two fingers around a physical point, spreading or closing until their span is scale times what it was.
override
pressHardwareButton(HardwareButton button) → Future<void>
override
pressKey(KeyName key, {int count = 1, Set<KeyModifier> modifiers = const {}}) → Future<void>
Presses key count times, each press bracketed by modifiers. Throws UnsupportedBackendAction when the backend has no keyboard.
override
screenshot(String path) → Future<ScreenshotResult>
Capture a PNG to path for device-mode perception; also the coordinate reference (ratio = pixel / size).
override
selectAll() → Future<void>
Selects all text in the focused field (cmd+A on iOS, ctrl+A on Android).
override
startRecording(String path) → Future<ScreenRecording>
Starts recording the display into path. Throws UnsupportedBackendAction when the backend cannot record.
override
swipe({required int physicalX1, required int physicalY1, required int physicalX2, required int physicalY2, required int durationMs, int holdMs = 0}) → Future<void>
override
takeInput() → InputReport?
How the last input was delivered, cleared on read; null for single-path backends.
inherited
tap({required int physicalX, required int physicalY}) → Future<void>
override
tapSequence(List<({int x, int y})> points, {required int intervalMs}) → Future<void>
Taps each physical point in order with intervalMs between taps.
override
toString() → String
A string representation of this object.
inherited
typeText(String text, {int? keyDelayMs}) → Future<void>
ASCII goes key by key; other text goes through the pasteboard, which the hardware keyboard cannot type.
override
warm() → Future<void>
Starts slow connections ahead of the first input, so it lands without a cold start; failures surface on that input instead.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited