<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPNowPlayingSession",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPNowPlayingSession"
  },
  "title" : "MPNowPlayingSession"
}
-->

# MPNowPlayingSession

An object that manages Now Playing information and remote commands for multiple players.

```
class MPNowPlayingSession
```

## Overview

An <doc://com.apple.documentation/documentation/AVFoundation/AVPlayer> object can have only one Now Playing session. An <doc://com.apple.documentation/documentation/AVKit/AVPlayerViewController> manages its own player and Now Playing session, so you can’t add your own Now Playing session.

> Important:
> If you create an `MPNowPlayingSession` object, don’t attempt to use it with the `AVPlayer` that an `AVPlayerViewController` presents. Create your own `AVPlayer` instance with custom playback controls to use with your Now Playing session.

## Topics

### Creating a session

[`-  initWithPlayers:`](/documentation/MediaPlayer/MPNowPlayingSession/init(players:))

Creates a Now Playing session object.

### Accessing the delegate object

[`delegate`](/documentation/MediaPlayer/MPNowPlayingSession/delegate)

The Now Playing session’s delegate object.

[`MPNowPlayingSessionDelegate`](/documentation/MediaPlayer/MPNowPlayingSessionDelegate)

A protocol that defines the delegate interface for a Now Playing session.

### Managing players

[`players`](/documentation/MediaPlayer/MPNowPlayingSession/players)

The array of players associated with the session.

[`-  addPlayer:`](/documentation/MediaPlayer/MPNowPlayingSession/addPlayer(_:))

Adds a player to the session.

[`-  removePlayer:`](/documentation/MediaPlayer/MPNowPlayingSession/removePlayer(_:))

Removes a player from the session.

### Managing the active state

[`active`](/documentation/MediaPlayer/MPNowPlayingSession/isActive)

A Boolean value that indicates whether the session is the app’s active Now Playing session.

[`canBecomeActive`](/documentation/MediaPlayer/MPNowPlayingSession/canBecomeActive)

A Boolean value that indicates whether the session can become the app’s active Now Playing session.

[`-  becomeActiveIfPossibleWithCompletion:`](/documentation/MediaPlayer/MPNowPlayingSession/becomeActiveIfPossible(completion:))

Tells the system to make the session the active Now Playing session if possible.

### Configuring Now Playing information

[`automaticallyPublishesNowPlayingInfo`](/documentation/MediaPlayer/MPNowPlayingSession/automaticallyPublishesNowPlayingInfo)

A Boolean that indicates whether Now Playing info automatically publishes.

[`nowPlayingInfoCenter`](/documentation/MediaPlayer/MPNowPlayingSession/nowPlayingInfoCenter)

The Now Playing information center associated with the session.

### Handling remote commands

[`remoteCommandCenter`](/documentation/MediaPlayer/MPNowPlayingSession/remoteCommandCenter)

The remote command center associated with the session.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

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

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

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

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

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

---

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)