Retrieve all Playlists iOS SDK


/ Published in: iPhone
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. MPMediaQuery *query = [MPMediaQuery playlistsQuery];
  2. NSArray *playlists = [query collections];
  3. for(int i = 0; i < [playlists count]; i++) {
  4. NSLog(@"%@", [[playlists objectAtIndex:i] valueForProperty: MPMediaPlaylistPropertyName]);
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.