One Logo Pool Ball
NowPlaying · IOS API REFERENCE

RemoteMediaSession

class · iOS 27.0+ · SDK 27.1

@MainActor class RemoteMediaSession<Attributes> where Attributes : RemoteMediaSessionAttributes

A session that manages remote media playback across devices. Use a remote session to represent media playback sessions happening outside of this device, but that your app wants to donate to the system so they may appear in the system's Now Playing interface. Use this API when your app has information about the remote session and wants to signal to the system that playback has started (using ``start(attributes:)``) or something about the session has changed (using ``update(_:)``). You can also donate remote sessions to the system through push notifications, for example when playback starts while your app isn't running. In that case, use APNs to send a push notification to the user's device that informs the system of a `start`, `update`, or `end` event. For more information, see <doc:publishing-remote-media-sessions> The following example shows how to start a session: ```swift struct MySessionAttributes: RemoteMediaSessionAttributes { let id: String let trackID: String } let attributes = MySessionAttributes(id: "session-123", trackID: "track-123") let session = try await RemoteMediaSession.start(attributes: attributes) ``` After starting a session, update its attributes or end it: ```swift // Update the session attributes try await session.update(newAttributes) // End the session when playback completes try await session.end() ```

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

9 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

RemoteMediaSession.id

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

RemoteMediaSession.isSystemPrimary

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

RemoteMediaSession.start(attributes:)

This declaration needs Swift generic type arguments. (no canonical witness for Attributes)

RemoteMediaSession.sessions()

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

RemoteMediaSession.update(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Attributes)

RemoteMediaSession.end()

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

RemoteMediaSession.requestToBecomeSystemPrimary()

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

RemoteMediaSession.pushToStartTokenUpdates

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

RemoteMediaSession.pushToStartToken

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

All NowPlaying types →