0

iPod からすべてのユーザーのプレイリストを取得し、プレイリストの ID で並べ替えようとしています。
これは私がこれまで行ったことです:

MPMediaQuery *allPlaylistsQuery = [MPMediaQuery playlistsQuery];
NSArray *allPlaylists = [allPlaylistsQuery collections];
NSArray *sortedPlaylists = [allPlaylists sortedArrayUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:MPMediaPlaylistPropertyPersistentID ascending:YES]]];  

しかし、例外が発生します:

'[<MPConcreteMediaPlaylist 0x14f38590> valueForUndefinedKey:]: this class is not key value coding-compliant for the key playlistPersistentID.'  

では、なぜそのようなソートを行うのが最も簡単な (そして効率的な) のでしょうか?

4

1 に答える 1