Contents

DDDeviceEvent

An object that provides a device or communicates its change in status.

Declaration

class DDDeviceEvent

Overview

The extension creates and configures an instance of this class to represent a moment of interest in the device discovery life cycle. The event’s eventType (DDDeviceEvent.EventType) describes a particular status.

For example, when the extension discovers a device of interest, it instantiates an instance of this class with the type DDDeviceEvent.EventType.deviceFound.

var session: DDDiscoverySession?
...
var deviceEvent = DDDeviceEvent(eventType: .deviceFound, device: ddDevice)

Then, the extension provides the discovered device to the system using report(_:) for eventual display in the route picker view (AVRoutePickerView).

session?.report(deviceEvent)

Topics

Creating a device event

Configuring a device event

See Also

Life cycle