Use a now playing info center to set now-playing information for media being played by your app.
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.
支持lock screen, AirPlay ,iPod accessory, 欢喜
看看sample code
-(void)updateInfoCenter:(UIImage*)cover
{
MPNowPlayingInfoCenter *infoCenter=[MPNowPlayingInfoCenter defaultCenter];
NSMutableDictionary *info=[[NSMutableDictionary alloc] initWithCapacity:2];
[info setObject:currentSong.Artist forKey:MPMediaItemPropertyArtist];
[info setObject:[currentSong nameStr] forKey:MPMediaItemPropertyTitle];
MPMediaItemArtwork *itemwork=[[MPMediaItemArtwork alloc] initWithImage:cover];
[info setObject:itemwork forKey:MPMediaItemPropertyArtwork];
[infoCenter setNowPlayingInfo:info];
}
官方说明
Enriching Your App for AirPlay
Provide Audio Metadata
Your audio may be playing on a big-screen home theater system or on a sound system with an LCD display. Your app gives a better user experience if you provide metadata that can be shown on the AirPlay device's display, such as the artist name, song title, and album art.
Add metadata by passing a dictionary into the setNowPlayingInfo method of MPNowPlayingInfoCenter. The MPNowPlayingInfoCenter class is part of the MediaPlayerframework, but works with all playback frameworks, including MediaPlayer, AVFoundation, and AudioQueue.
In addition to providing the usual song information strings, you should also pass in the playback rate, elapsed time, and media item duration. The playback device can use the duration and playback rate to create a progress bar. Update the elapsed time and playback rate whenever the playback rate changes.


