<!--
{
  "documentType" : "article",
  "framework" : "Xcode",
  "identifier" : "/documentation/Xcode/configuring-media-device-discovery",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Configuring media device discovery"
}
-->

# Configuring media device discovery

Add a third-party media device or protocol as a streaming option in the same system menu as AirPlay.

## Overview

> Important: Media Device Discovery Extension is deprecated in iOS 27.0 and visionOS 27.0. Refer to <doc://com.apple.documentation/documentation/AVSystemRouting/routing-and-streaming-media-to-remote-devices> for device discovery.

Enable the Media Device Discovery capability in an iOS app extension to indicate its intent to search the local network or paired Bluetooth devices for a third-party media receiver. This capability corresponds to the <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.media-device-discovery-extension> entitlement. When you enable Media Device Discovery, Xcode adds the entitlement to a code-signing entitlements file for the extension’s target.

At run-time, when a user invokes a UI to play media, the app presents an <doc://com.apple.documentation/documentation/AVKit/AVRoutePickerView> to offer possible devices for the user to stream to. The system searches your app’s bundle for extensions with this entitlement to check whether your app provides such a device. If so, the system adds the third-party device next to any available AirPlay devices in the picker, which provides the user with a unified media streaming experience.

## Add the Media Device Discovery capability to your target

To add the capability, follow the steps in the [Add a capability](/documentation/Xcode/adding-capabilities-to-your-app#Add-a-capability)
section of [Adding capabilities to your app](/documentation/Xcode/adding-capabilities-to-your-app) for your extension’s target. If you add a new target in your Xcode project using the Media Device Discovery template, Xcode enables this capability automatically.

![A screenshot of Xcode’s Capabilities library. The Media Device Discovery capability is in a selected state.](images/com.apple.Xcode/media-device-discovery@2x.png)

## Code the extension

Code the extension to search the local network or paired Bluetooth devices for a specific media receiver by using the <doc://com.apple.documentation/documentation/DeviceDiscoveryExtension> framework. If the search succeeds, the extension passes the discovered device to the system. For an example app that demonstrates media device discovery, see <doc://com.apple.documentation/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)