Search code examples
iosobjective-copenurl

How to open default music app into my application ios 10


Based in this link.

Works perfect but me in old ios versions, but in ios 10 not works.

This is my code:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"music://"]];

I'm testing with

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"music://"] options:@{} completionHandler:nil];

but it does not work


Solution

  • Just add Privacy - Media Library Usage Description in .plist. That solves the problem