Return to Snippet

Revision: 48182
at June 26, 2011 11:14 by nd6


Initial Code
MPMediaQuery *query = [MPMediaQuery playlistsQuery]; 
NSArray *playlists = [query collections];
for(int i = 0; i < [playlists count]; i++) {
NSLog(@"%@", [[playlists objectAtIndex:i] valueForProperty: MPMediaPlaylistPropertyName]);
}

Initial URL

                                

Initial Description
First you need to create an MPMediaQuery using the playListsQuery.
Then, you loop through each playlist and retrieve the valueForProperty.

Initial Title
Retrieve all Playlists iOS SDK

Initial Tags
ios

Initial Language
iPhone