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
  • 722
  • 9
  • 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");
        }
    }];
Nirav Kotecha
  • 2,493
  • 1
  • 12
  • 26
  • you can also see this link.. https://stackoverflow.com/questions/8246070/ios-launching-settings-restrictions-url-scheme/8246814#8246814 – Nirav Kotecha Jan 18 '18 at 20:29