<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPNowPlayingTemplate",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPNowPlayingTemplate"
  },
  "title" : "CPNowPlayingTemplate"
}
-->

# CPNowPlayingTemplate

A shared system template that displays Now Playing information.

```
@MainActor class CPNowPlayingTemplate
```

## Overview

The Now Playing template displays information from <doc://com.apple.documentation/documentation/MediaPlayer/MPNowPlayingInfoCenter> and <doc://com.apple.documentation/documentation/MediaPlayer/MPNowPlayingSession>. Instead of instantiating your own Now Playing template, CarPlay provides a shared instance that you configure. The template displays a series of playback control buttons, as well as information about the current album and artist, and what’s coming up next.

When enabling your Now Playing template’s Album-Artist and Up Next buttons, you must create an object that implements the [`CPNowPlayingTemplateObserver`](/documentation/CarPlay/CPNowPlayingTemplateObserver) protocol and register it as an observer by calling the template’s [`add(_:)`](/documentation/CarPlay/CPNowPlayingTemplate/add(_:)) method.

To display the Now Playing template, call your interface controller’s [`pushTemplate(_:animated:completion:)`](/documentation/CarPlay/CPInterfaceController/pushTemplate(_:animated:completion:)) method to push it onto your navigation hierarchy. You can’t display the Now Playing template modally.

When CarPlay presents Now Playing information for your app, it uses the shared instance of this template.

> Note:
> `CPNowPlayingTemplate` is only available in apps with the audio entitlement.

## Topics

### Managing the Shared Template

[`shared`](/documentation/CarPlay/CPNowPlayingTemplate/shared)

The Now Playing template the system provides.

### Managing the Template’s Buttons

[`nowPlayingButtons`](/documentation/CarPlay/CPNowPlayingTemplate/nowPlayingButtons)

The Now Playing template’s playback control buttons.

[`updateNowPlayingButtons(_:)`](/documentation/CarPlay/CPNowPlayingTemplate/updateNowPlayingButtons(_:))

Updates the playback control buttons the template displays.

[`CPNowPlayingButton`](/documentation/CarPlay/CPNowPlayingButton)

The abstract base class that Now Playing template buttons use.

[`CPNowPlayingImageButton`](/documentation/CarPlay/CPNowPlayingImageButton)

A button that displays an image.

[`CPNowPlayingAddToLibraryButton`](/documentation/CarPlay/CPNowPlayingAddToLibraryButton)

A button for adding the current playing item to a collection.

[`CPNowPlayingMoreButton`](/documentation/CarPlay/CPNowPlayingMoreButton)

A button for presenting more options to the user.

[`CPNowPlayingPlaybackRateButton`](/documentation/CarPlay/CPNowPlayingPlaybackRateButton)

A button for cycling through the available playback rates.

[`CPNowPlayingRepeatButton`](/documentation/CarPlay/CPNowPlayingRepeatButton)

A button for cycling through the available repeat modes.

[`CPNowPlayingShuffleButton`](/documentation/CarPlay/CPNowPlayingShuffleButton)

A button for cycling through the available shuffle modes.

### Managing Albums, Artists, and Up Next

[`isAlbumArtistButtonEnabled`](/documentation/CarPlay/CPNowPlayingTemplate/isAlbumArtistButtonEnabled)

A Boolean value that indicates whether the album and artist string is a button.

[`isUpNextButtonEnabled`](/documentation/CarPlay/CPNowPlayingTemplate/isUpNextButtonEnabled)

A Boolean value that manages the display of the Up Next button.

[`upNextTitle`](/documentation/CarPlay/CPNowPlayingTemplate/upNextTitle)

The title for the Up Next button.

### Observing Now Playing Events

[`add(_:)`](/documentation/CarPlay/CPNowPlayingTemplate/add(_:))

Registers an observer that receives Now Playing template events.

[`remove(_:)`](/documentation/CarPlay/CPNowPlayingTemplate/remove(_:))

Removes an observer from receiving Now Playing template events.

[`CPNowPlayingTemplateObserver`](/documentation/CarPlay/CPNowPlayingTemplateObserver)

The methods for responding to the user interacting with the Now Playing template.



---

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)