<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceDiscoveryExtension",
  "identifier" : "/documentation/DeviceDiscoveryExtension/DDDiscoveryExtension/didReceiveEvent(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DeviceDiscoveryExtension"
    ],
    "preciseIdentifier" : "s:24DeviceDiscoveryExtension011DDDiscoveryC0P15didReceiveEventyySo08DDDeviceG0CF"
  },
  "title" : "didReceiveEvent(_:)"
}
-->

# didReceiveEvent(_:)

Provides a device event from the system to the extension.

```
func didReceiveEvent(_ event: DDDeviceEvent)
```

## Parameters

`event`

A moment of interest in the device discovery life cycle.

## Discussion

The system calls this function to give the app’s `DDDiscoveryExtension` information about the device. For example, when someone selects the device in the AirPlay menu (<doc://com.apple.documentation/documentation/AVKit/AVRoutePickerView>), the system notifies the extension of the state change by invoking this callback.

---

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)