---
title: sessions()
framework: nowplaying
role: symbol
role_heading: Type Method
path: nowplaying/remotemediasession/sessions()
---

# sessions()

Returns all registered remote sessions.

## Declaration

```swift
@MainActor static func sessions() async throws -> [RemoteMediaSession<Attributes>]
```

## Return Value

Return Value An array of all remote sessions currently registered with the system.

## Discussion

Discussion note: RemoteMediaSessionError.internalFailure if the system couldn’t enumerate registered sessions.
