4

Is there a way to open Settings app from today's widget directly. If you need to open it from within the app.

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

I have tried using this variation from today's widget

[[self extensionContext] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] completionHandler:nil];

but it gives following error

enter image description here

I found an indirect way to open it by first opening the app using URL Scheme and then opening the Setting App from within the app. However, this is not desirable. So, Is there a direct way to achieve this?

Thanks

Community
  • 1
  • 1
Kamran Khan
  • 1,367
  • 1
  • 15
  • 19
  • 3
    Strange, it appears to be unsupported for now. – Tom Harrington Apr 07 '15 at 20:43
  • Did you find a way to do this after all? – razvan Jan 22 '18 at 12:22
  • I didn't check after that. I am not sure if there is any new API now to that. Most likely there isn't. Follow the way I did it as mentioned above. Create a URL Scheme on app and send the data to it and parse it there and open setting in your phone that way. – Kamran Khan Jan 23 '18 at 04:09

0 Answers0