---
title: "didReceiveEvent(_:)"
framework: DeviceDiscoveryExtension
role: symbol
role_heading: Instance Method
platforms: [iOS 17.0+, iPadOS 17.0+, macOS 13.0+]
path: "devicediscoveryextension/dddiscoveryextension/didreceiveevent(_:)"
---

# didReceiveEvent(_:)

Provides a device event from the system to the extension.

## Declaration

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

## Parameters

- `event`: A moment of interest in the device discovery life cycle.

## Discussion

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 (AVRoutePickerView), the system notifies the extension of the state change by invoking this callback.
