---
title: CPNowPlayingTemplate
framework: carplay
role: symbol
role_heading: Class
path: carplay/cpnowplayingtemplate
---

# CPNowPlayingTemplate

A shared system template that displays Now Playing information.

## Declaration

```swift
@MainActor class CPNowPlayingTemplate
```

## Overview

Overview The Now Playing template displays information from MPNowPlayingInfoCenter and 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 protocol and register it as an observer by calling the template’s add(_:) method. To display the Now Playing template, call your interface controller’s 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](carplay/cpnowplayingtemplate/shared.md)

### Managing the Template’s Buttons

- [nowPlayingButtons](carplay/cpnowplayingtemplate/nowplayingbuttons.md)
- [updateNowPlayingButtons(_:)](carplay/cpnowplayingtemplate/updatenowplayingbuttons(_:).md)
- [CPNowPlayingButton](carplay/cpnowplayingbutton.md)
- [CPNowPlayingImageButton](carplay/cpnowplayingimagebutton.md)
- [CPNowPlayingAddToLibraryButton](carplay/cpnowplayingaddtolibrarybutton.md)
- [CPNowPlayingMoreButton](carplay/cpnowplayingmorebutton.md)
- [CPNowPlayingPlaybackRateButton](carplay/cpnowplayingplaybackratebutton.md)
- [CPNowPlayingRepeatButton](carplay/cpnowplayingrepeatbutton.md)
- [CPNowPlayingShuffleButton](carplay/cpnowplayingshufflebutton.md)

### Managing Albums, Artists, and Up Next

- [isAlbumArtistButtonEnabled](carplay/cpnowplayingtemplate/isalbumartistbuttonenabled.md)
- [isUpNextButtonEnabled](carplay/cpnowplayingtemplate/isupnextbuttonenabled.md)
- [upNextTitle](carplay/cpnowplayingtemplate/upnexttitle.md)

### Observing Now Playing Events

- [add(_:)](carplay/cpnowplayingtemplate/add(_:).md)
- [remove(_:)](carplay/cpnowplayingtemplate/remove(_:).md)
- [CPNowPlayingTemplateObserver](carplay/cpnowplayingtemplateobserver.md)

### Instance Properties

- [allowsMiniPlayer](carplay/cpnowplayingtemplate/allowsminiplayer.md)
- [nowPlayingMode](carplay/cpnowplayingtemplate/nowplayingmode.md)

## Relationships

### Inherits From

- [CPTemplate](carplay/cptemplate.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Audio

- [Integrating CarPlay with Your Music App](carplay/integrating-carplay-with-your-music-app.md)
