On iPhone: Find out what song is currently playing? (in the iPod music player)

Solutions Collect From Internet About “On iPhone: Find out what song is currently playing? (in the iPod music player)”

MPMediaItem * song = [[MPMusicPlayerController iPodMusicPlayer] nowPlayingItem];
NSString * title   = [song valueForProperty:MPMediaItemPropertyTitle];
NSString * album   = [song valueForProperty:MPMediaItemPropertyAlbumTitle];
NSString * artist  = [song valueForProperty:MPMediaItemPropertyArtist];