---
title: AVSystemRouting
framework: avsystemrouting
role: collection
role_heading: Framework
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+]
path: avsystemrouting
---

# AVSystemRouting

Send media from your app to a TV, speaker, or other device through a media device extension.

## Overview

Overview The AVSystemRouting framework lets your app send media to other devices, like TVs and speakers. Media sharing protocol providers distribute media device extensions through their own apps so you don’t need to bundle each device’s SDK in your app. When someone selects a device, your app receives an event describing their choice and starts a playback session on that device.

Your app uses the shared AVSystemRouteController and registers an AVSystemRouteControllerObserver to receive routing events. When your app receives an AVSystemRouteEvent with an AVSystemRouteEvent.Reason.activate reason, create an AVSystemRouteSession with a URL and an AVSystemRoute.LaunchMode the device supports. The launch mode either plays the URL on the receiver or launches your app’s counterpart there. Add the session to the event’s AVSystemRoute, then start it; on success, you receive an AVSystemRouteMediaSession for managing playback. Declare your supported protocols in your app’s Info pane in Xcode using the MDESupportedProtocols key, and add MDESupportsUniversalURLPlayback as needed for URL-based playback. After starting a session, use the AVSystemRouteMediaSession class’s playback control to manage remote playback and receive state updates. For communication that includes a companion app on the remote device, use the media session’s data channel and implement AVSystemRouteDataDelegate. AVSystemRouting is the app-side counterpart to the Media Device framework, which provides the extension API that media sharing protocol providers implement. To learn how extension providers register their protocols and handle playback, see Creating a media device extension. The two frameworks communicate through the system, so your app never needs to interact with protocol-specific details directly.

## Topics

### Essentials

- [Routing media to third-party devices](avsystemrouting/routing-media-to-third-party-devices.md)
- [Routing and streaming media to remote devices](avsystemrouting/routing-and-streaming-media-to-remote-devices.md)
- [AVSystemRouteController](avsystemrouting/avsystemroutecontroller-18ns8.md)
- [AVSystemRouteControllerObserver](avsystemrouting/avsystemroutecontrollerobserver-5syvg.md)

### Routing events

- [AVSystemRouteEvent](avsystemrouting/avsystemrouteevent-2elr5.md)
- [AVSystemRouteEvent.Reason](avsystemrouting/avsystemrouteevent-2elr5/reason-swift.enum.md)

### Routes and sessions

- [AVSystemRoute](avsystemrouting/avsystemroute-5s2um.md)
- [AVSystemRouteSession](avsystemrouting/avsystemroutesession-gp78.md)
- [AVSystemRoute.LaunchMode](avsystemrouting/avsystemroute-5s2um/launchmode.md)

### Playback and communication

- [AVSystemRouteMediaSession](avsystemrouting/avsystemroutemediasession-98ioq.md)
- [AVSystemRoute.DataChannel](avsystemrouting/avsystemroute-5s2um/datachannel.md)
- [AVSystemRouteDataDelegate](avsystemrouting/avsystemroutedatadelegate-7vt4b.md)

### Errors

- [AVSystemRoutingError](avsystemrouting/avsystemroutingerror-7miya.md)
- [AVSystemRoutingError](avsystemrouting/avsystemroutingerror-19zkj.md)
