1
NSArray * songs = [[NSArray alloc] initWithArray:[[MPMediaQuery songsQuery] collections]];
for (MPMediaItemCollection * item in songs){
NSString * persistentID = [[[item representativeItem] valueForProperty:MPMediaItemPropertyPersistentID] stringValue];
// Do something with it.
???
}
一旦我有MPMediaItemPropertyPersistentID,我該如何播放歌曲?一旦我有MPMediaItemPropertyPersistentID,我該如何播放歌曲?