<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceDiscoveryExtension",
  "identifier" : "/documentation/DeviceDiscoveryExtension/DDDeviceEvent",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "DeviceDiscoveryExtension"
    ],
    "preciseIdentifier" : "c:objc(cs)DDDeviceEvent"
  },
  "title" : "DDDeviceEvent"
}
-->

# DDDeviceEvent

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

```
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`](/documentation/DeviceDiscoveryExtension/DDDeviceEvent/EventType-swift.enum)) 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`](/documentation/DeviceDiscoveryExtension/DDDeviceEvent/EventType-swift.enum/deviceFound).

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

Then, the extension provides the discovered device to the system using [`report(_:)`](/documentation/DeviceDiscoveryExtension/DDDiscoverySession/report(_:)) for eventual display in the route picker view (<doc://com.apple.documentation/documentation/AVKit/AVRoutePickerView>).

```swift
session?.report(deviceEvent)
```

## Topics

### Creating a device event

[`-  initWithEventType:device:`](/documentation/DeviceDiscoveryExtension/DDDeviceEvent/init(eventType:device:))

Creates an event object that conveys status for a discovered device of interest.

### Configuring a device event

[`eventType`](/documentation/DeviceDiscoveryExtension/DDDeviceEvent/eventType-swift.property)

A type for the event that describes the discovery status.

[`EventType`](/documentation/DeviceDiscoveryExtension/DDDeviceEvent/EventType-swift.enum)

Identifiers for the types of events that occur in the device discovery life cycle.

[`device`](/documentation/DeviceDiscoveryExtension/DDDeviceEvent/device)

An object that describes a third-party media receiver.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)