Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call the official *Settings* app from my app on iPhone

At one point in my app, I would like to redirect the user to the official Settings app. If possible, I also want go straight to the Network section within the Settings app.

I think what I need is the Settings app's url scheme and the format to construct my request. But I doubt that calling such an official app is forbidden.

Can anyone can help me?

like image 804
Di Wu Avatar asked Dec 21 '10 06:12

Di Wu


People also ask

How do I trust an app on my iPhone?

Tap Settings > General > Profiles or Profiles & Device Management. Under the "Enterprise App" heading, you see a profile for the developer. Tap the name of the developer profile under the Enterprise App heading to establish trust for this developer. Then you see a prompt to confirm your choice.


2 Answers

As noted in the comments below, this is no longer possible in iOS version 5.1 and after.

If you are on iOS 5.0, the following applies:

This is now possible in iOS 5 using the 'prefs:' url scheme. It works from a web page or from an app.

example urls:

prefs:root=General prefs:root=General&path=Network 

sample usage:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]] [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General&path=Network"]] 
like image 67
mattorb Avatar answered Sep 22 '22 08:09

mattorb


From IOS 8 you can call the settings from within app with this:

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

like image 35
dynebuddha Avatar answered Sep 23 '22 08:09

dynebuddha