Created
January 20, 2014 09:11
-
-
Save cyndibaby905/8517192 to your computer and use it in GitHub Desktop.
Get iPod's current playing info. Do not use `MPNowPlayingInfoCenter`, since it works only for your current application.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MPMusicPlayerController* player = [MPMusicPlayerController iPodMusicPlayer]; | |
//get now playing item | |
if (player.playbackState == MPMusicPlaybackStatePlaying) { | |
MPMediaItem*item = [player nowPlayingItem]; | |
NSLog(@"playing %@",[item valueForProperty:MPMediaItemPropertyTitle]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment