An object that you use to set now-playing information for media being played by your app.
- iOS 5.0+
- macOS 10.12.2+
- tvOS 9.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.
When playing audio or video content, use the
MPNow object to provide descriptive information about the content being played. The
MPNow object contains a
now dictionary whose contents describe the item being played. The system displays the information from that dictionary in appropriate places, such as on the lock screen of an iOS device.
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 Additional 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.