<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVSystemRouting",
  "identifier" : "/documentation/AVSystemRouting/AVSystemRoute-5s2um/addSession(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVSystemRouting"
    ],
    "preciseIdentifier" : "s:15AVSystemRouting0A5RouteC10addSessionySbAA0acE0CF"
  },
  "title" : "addSession(_:)"
}
-->

# addSession(_:)

Adds a session to the active route.

```
final func addSession(_ session: AVSystemRouteSession) -> Bool
```

## Parameters

`session`

The session to add to this route. The session must be newly created and
not already associated with another route or previously stopped.

## Return Value

`true` if the route successfully adds the session; `false` if the route cannot add it
(for example, if the session is already associated with another route or if the
route is in an invalid state).

## Discussion

Call this function to register a new [`AVSystemRouteSession`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78) with the route before starting
playback or communication. The session must be added to the route before calling its
[`start()`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78/start()) function.

Adding a session establishes the association between the session and this route, enabling
the system to manage the session’s lifecycle and route media appropriately. You can add
multiple sessions to a single route to handle different media streams or communication channels.

Sessions are single-use. Once a session has been stopped, it cannot be added to a route
again. Create a new [`AVSystemRouteSession`](/documentation/AVSystemRouting/AVSystemRouteSession-gp78) for each new playback.

> Note: You must remove sessions when they are no longer needed using ``doc://com.apple.avsystemrouting/documentation/AVSystemRouting/AVSystemRoute-5s2um/removeSession(_:)``
> to release system resources.

---

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)