tags:

views:

38

answers:

1

How to get the play list of song currently playing in iphone programmatically? I could use the following code to get the song's artist:

[currentItem valueForProperty: MPMediaItemPropertyArtist]

I couldn't find the property for the song's playlist.

+1  A: 

MPMediaItems don't know what collections they're in. What you want is the current playback queue, which would be accessible through the [MPMusicPlayerController iPodMusicPlayer] Unfortunately apple doesn't give access to this at this point.