我MPMediaPickerController
在设备上有一首可用于在我的应用上发送给其他用户的歌曲。我已经过滤掉了 Cloud 项目,但我还想过滤掉 Apple Music 中“离线可用”的歌曲。
-(void)openMusic:(NSNotification *)notification {
if ([[notification name] isEqualToString:@"myMusic"]){
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.75 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
MPMediaPickerController *mediaPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic];
mediaPicker.delegate = self;
mediaPicker.allowsPickingMultipleItems = NO;
mediaPicker.showsCloudItems = NO;
[self presentViewController:mediaPicker animated:YES completion:nil];
});
}
}
目前,它仍在显示所有下载的 Apple Music 曲目。我怎样才能过滤掉它们?