Im trying to fetch all the user's playlists from iPod and sort them by playlist's ID.
This is what I did so far:
MPMediaQuery *allPlaylistsQuery = [MPMediaQuery playlistsQuery];
NSArray *allPlaylists = [allPlaylistsQuery collections];
NSArray *sortedPlaylists = [allPlaylists sortedArrayUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:MPMediaPlaylistPropertyPersistentID ascending:YES]]];
But I get exception:
'[<MPConcreteMediaPlaylist 0x14f38590> valueForUndefinedKey:]: this class is not key value coding-compliant for the key playlistPersistentID.'
So whats the easiest (and efficiet) why to do such sort?