<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVSystemRouting",
  "identifier" : "/documentation/AVSystemRouting",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "AVSystemRouting"
    ],
    "preciseIdentifier" : "AVSystemRouting"
  },
  "title" : "AVSystemRouting"
}
-->

# AVSystemRouting

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

## 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.

![An illustration showing an iPhone on the left sending a media stream wirelessly to a pair of external speakers on the right.](images/com.apple.avsystemrouting/av-system-routing-hero@2x.png)

Your app uses the shared [`AVSystemRouteController`](/documentation/AVSystemRouting/AVSystemRouteController-18ns8) and registers an
[`AVSystemRouteControllerObserver`](/documentation/AVSystemRouting/AVSystemRouteControllerObserver-5syvg) to receive routing events. When your app receives an
[`AVSystemRouteEvent`](/documentation/AVSystemRouting/AVSystemRouteEvent-2elr5) with an [`AVSystemRouteEvent.Reason.activate`](/documentation/AVSystemRouting/AVSystemRouteEvent-2elr5/Reason-swift.enum/activate) reason, create an
[`AVSystemRouteSession`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78) with a URL and an [`AVSystemRoute.LaunchMode`](/documentation/AVSystemRouting/AVSystemRoute-5s2um/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`](/documentation/AVSystemRouting/AVSystemRoute-5s2um), then start it; on
success, you receive an [`AVSystemRouteMediaSession`](/documentation/AVSystemRouting/AVSystemRouteMediaSession-98ioq) for managing playback.

Declare your supported protocols in your app’s Info pane in Xcode using the
<doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/MDESupportedProtocols>
key, and add
<doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/MDESupportsUniversalURLPlayback>
as needed for URL-based playback.

After starting a session, use the [`AVSystemRouteMediaSession`](/documentation/AVSystemRouting/AVSystemRouteMediaSession-98ioq) 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`](/documentation/AVSystemRouting/AVSystemRouteDataDelegate-7vt4b).

AVSystemRouting is the app-side counterpart to the
<doc://com.apple.documentation/documentation/MediaDevice> framework, which provides the extension API
that media sharing protocol providers implement. To learn how extension providers
register their protocols and handle playback, see
<doc://com.apple.documentation/documentation/MediaDevice/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](/documentation/AVSystemRouting/routing-media-to-third-party-devices)

Respond to routing events and control playback on a TV, speaker, or other media device.

[Routing and streaming media to remote devices](/documentation/AVSystemRouting/routing-and-streaming-media-to-remote-devices)

Send media from an app to nearby remote playback devices.

[`AVSystemRouteController`](/documentation/AVSystemRouting/AVSystemRouteController-18ns8)

An object that manages interaction with system routes.

[`AVSystemRouteController`](/documentation/AVSystemRouting/AVSystemRouteController-4teia)

An object that manages interaction with system routes.

[`AVSystemRouteControllerObserver`](/documentation/AVSystemRouting/AVSystemRouteControllerObserver-5syvg)

A protocol for observers of a system routing controller.

[`AVSystemRouteControllerObserver`](/documentation/AVSystemRouting/AVSystemRouteControllerObserver-7p7a5)

A protocol for observers of a system routing controller.

### Routing events

[`AVSystemRouteEvent`](/documentation/AVSystemRouting/AVSystemRouteEvent-2elr5)

An object that represents an event that occurs on a system route.

[`AVSystemRouteEvent`](/documentation/AVSystemRouting/AVSystemRouteEvent-1r0st)

An object that represents an event that occurs on a system route.

[`AVSystemRouteEvent.Reason`](/documentation/AVSystemRouting/AVSystemRouteEvent-2elr5/Reason-swift.enum)

Values that indicate the reason for a routing event.

[`AVSystemRouteEventReason`](/documentation/AVSystemRouting/AVSystemRouteEventReason)

Values that indicate the reason for a routing event.

### Routes and sessions

[`AVSystemRoute`](/documentation/AVSystemRouting/AVSystemRoute-5s2um)

An active media route to a remote device that manages connection and communication for media playback and data exchange.

[`AVSystemRoute`](/documentation/AVSystemRouting/AVSystemRoute-9kkj3)

An active media route to a remote device that manages connection and communication for media playback and data exchange.

[`AVSystemRouteSession`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78)

An object that manages a single media playback session on a remote device.

[`AVSystemRouteSession`](/documentation/AVSystemRouting/AVSystemRouteSession-5i6j6)

An object that manages a single media playback session on a remote device.

[`AVSystemRoute.LaunchMode`](/documentation/AVSystemRouting/AVSystemRoute-5s2um/LaunchMode)

The mode that determines how media playback launches on a remote device.

[`AVSystemRouteLaunchMode`](/documentation/AVSystemRouting/AVSystemRouteLaunchMode)

The mode that determines how media playback launches on a remote device.

### Playback and communication

[`AVSystemRouteMediaSession`](/documentation/AVSystemRouting/AVSystemRouteMediaSession-98ioq)

An object that provides playback controls and a data channel for a session running on a remote device.

[`AVSystemRouteMediaSession`](/documentation/AVSystemRouting/AVSystemRouteMediaSession-4mo0j)

An object that provides playback controls and a data channel for a session running on a remote device.

[`AVSystemRoute.DataChannel`](/documentation/AVSystemRouting/AVSystemRoute-5s2um/DataChannel)

An object that manages bidirectional data communication with a remote application.

[`AVSystemRouteDataDelegate`](/documentation/AVSystemRouting/AVSystemRouteDataDelegate-7vt4b)

A protocol for handling data from a remote application.

[`AVSystemRouteDataDelegate`](/documentation/AVSystemRouting/AVSystemRouteDataDelegate-3zbcm)

A protocol for handling data from a remote application.

### Errors

[`AVSystemRoutingError`](/documentation/AVSystemRouting/AVSystemRoutingError-7miya)

An error that an AVSystemRouting operation throws when it fails.

[`AVSystemRoutingError`](/documentation/AVSystemRouting/AVSystemRoutingError-19zkj)



---

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)
