0

I couldn't use below code to open Settings/Privacy/Photos from iPhone X

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=Privacy&path=PHOTOS"]];

But this code run well on other older devices

Bkillnest
  • 712
  • 8
  • 16

1 Answers1

0

after iOS 5.1 shortcuts are not working in devices. you can open setting page by following this code.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:^(BOOL success) {
        if (success) {
            NSLog(@"Opened Settings");
        }
    }];
iNiravKotecha
  • 2,445
  • 1
  • 11
  • 24
  • you can also see this link.. https://stackoverflow.com/questions/8246070/ios-launching-settings-restrictions-url-scheme/8246814#8246814 – iNiravKotecha Jan 18 '18 at 20:29