bindDevice static method
Bind an OS-level device with no Flutter VM (screenshots + coordinates); an iOS simulator with a runner also reads the native screen.
Implementation
static AppSession bindDevice({required DeviceTarget device}) {
final app = AppSession._(
device: device,
backend: device.createBackend(),
deviceMode: true,
appLogs: AppLogBuffer(),
);
if (device case IosSimulator(:final runner?, :final pixelsPerPoint)) {
app.nativeReader = app._runnerReader(runner, device, pixelsPerPoint);
}
return app;
}