4

Using the URL Scheme below, I'm able to open the 'Settings' App from the app I'm currently working on.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

Is it also possible to tweak the URL Scheme so that I can directly open the 'Notification Center' feature inside the 'Settings' App?

Kindly advise. All help appreciated!

2 Answers2

2

I tried this code to prevent crashes from iOS versions and it's working for me:

if ([[UIApplication sharedApplication] respondsToSelector:@selector(openURL:options:completionHandler:)]) {
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
} else {
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}
Pablo Blanco
  • 679
  • 8
  • 14
0

tested on iOS 8 up;

you can try this url scheme: "prefs:root=NOTIFICATIONS_ID" But u must add URL types in ur project: Click on ur Project in Project Navigator-> click on TARGET -> tab Info -> and add URL Types by click (+) and add URL scheme : "prefs".

if you still not clear check this Answer here

All the best,

Community
  • 1
  • 1
vhong
  • 594
  • 4
  • 27