Contents

MPNowPlayingInfoCenter

An object for setting the Now Playing information for media that your app plays.

Declaration

class MPNowPlayingInfoCenter

Mentioned in

Overview

If your app also provides Now Playing information containing information about the current track, use this object to update that information at appropriate times. This object contains a nowPlayingInfo dictionary describing the playing item.

The system displays Now Playing information on the device’s Lock Screen and in the media controls in Control Center. If the user directs playback of your media to Apple TV using AirPlay, the Now Playing information appears on the television screen. If the user connects a device to an iPod accessory, such as in a car, the accessory may display Now Playing information.

The information you can specify includes all of the Now Playing metadata properties (see the Accessing Now Playing metadata properties topic group below), and the following subset of MPMediaItem properties:

You don’t have direct control over what information the system displays, or its formatting. You set the values in the nowPlayingInfo dictionary and the system or the connected accessory handles displaying the information in a consistent manner for all apps.

You can ensure that your app interacts well with other apps providing Now Playing information by following the best practices in the Becoming a now playable app sample code project.

Topics

Working with the default Now Playing info center

Setting the playback state in macOS

Accessing Now Playing metadata properties

See Also

Now Playing information