An object that you use to set now-playing information for media being played by your app.
- iOS 5.0+
- macOS 10.12.2+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 5.0+
- Media Player
If your app also provides Now Playing information containing information about the current track, use an
MPNow object to update that information at appropriate times. The
MPNow object contains a
now dictionary whose contents describe the item being played.
The system displays now-playing information on the device lock screen and in the multimedia controls in the multitasking UI. If the user directs playback of your media to Apple TV via 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 a subset of the properties available in the media item class (
MPMedia), as well as some properties specific to this class. Additional properties you can set are described in this document in Now Playing Metadata Properties.
You do not have direct control over which information is displayed, or its formatting. You set the values of the now playing info center dictionary according to the information you want to provide to the system. The system, or the connected accessory, handles the information’s display 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 laid out in the Becoming a Now Playable App sample code project.