I have a MPMediaPickerController
showing songs available on the device to use for sending to other users on my app. I've filtered out Cloud items, but I also want to filter out songs from Apple Music that have been made "available offline."
-(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];
});
}
}
Currently, it's still showing all downloaded Apple Music tracks. How can I filter them out?