---
title: "session(_:)"
framework: nowplaying
role: symbol
role_heading: Instance Method
path: "nowplaying/remotemediasessionextension/session(_:)"
---

# session(_:)

Creates a session configured with the specified attributes.

## Declaration

```swift
@MainActor func session(_ attributes: Self.Attributes) async throws -> Self.Session
```

## Parameters

- `attributes`: The attributes that configure the session.

## Mentioned in

Publishing remote media sessions

## Return Value

Return Value A configured remote session.

## Discussion

Discussion note: An error if a session can’t be created.
