<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceDiscoveryExtension",
  "identifier" : "/documentation/DeviceDiscoveryExtension/DDEventHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "DeviceDiscoveryExtension"
    ],
    "preciseIdentifier" : "c:@T@DDEventHandler"
  },
  "title" : "DDEventHandler"
}
-->

# DDEventHandler

A function that the extension invokes to signal an event.

```
typealias DDEventHandler = (DDDeviceEvent) -> Void
```

## Parameters

`inEvent`

An event that the extension creates for the event handler.

## Discussion

A device discovery extension implements a closure of this format and calls it after creating argument events. In the implementation, the extension creates device events (`DDEvent`) and passes them to the system by calling [`report(_:)`](/documentation/DeviceDiscoveryExtension/DDDiscoverySession/report(_:)).

For an example event handler, see `Appex.swift` in [Discovering a third-party media-streaming device](/documentation/DeviceDiscoveryExtension/discovering-a-third-party-media-streaming-device).

---

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)