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

# AVSystemRouteSession

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

```
final class AVSystemRouteSession
```

## Overview

[`AVSystemRouteSession`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78) manages a single media playback session on a remote device. Create a
session to initiate playback on a connected device, communicate with a remote application, and
control the lifecycle of the remote playback experience.

To use a session:

1. Create an [`AVSystemRouteSession`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78) with a URL and launch mode
2. Add the session to an [`AVSystemRoute`](/documentation/AVSystemRouting/AVSystemRoute-5s2um) using [`addSession(_:)`](/documentation/AVSystemRouting/AVSystemRoute-5s2um/addSession(_:))
3. Start the session with [`start()`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78/start())
4. Use the returned [`AVSystemRouteMediaSession`](/documentation/AVSystemRouting/AVSystemRouteMediaSession-98ioq) to communicate with the remote device
5. Call [`stop()`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78/stop()) when playback ends to clean up resources

Sessions are single-use. After calling [`stop()`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78/stop()), the session cannot be
restarted or added to another route. Create a new [`AVSystemRouteSession`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78) for each new
playback.

## Reporting Playback Metadata

Report playback metadata to `MPNowPlayingInfoCenter` to ensure the system displays accurate
information about the current media across a person’s devices and in system UI.

## Topics

### Initializers

[`init(url: URL, mode: AVSystemRoute.LaunchMode)`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78/init(url:mode:))

Creates a session for initiating playback on a remote device.

### Instance Methods

[`func start() async throws -> AVSystemRouteMediaSession`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78/start())

Starts the session and initiates media playback on the remote device.

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

Stops the session and terminates media playback on the remote device.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)