3

I had a requirement to redirect a user to the iOS Settings application from within my application. I know that in iOS 5, we could use the following URL scheme to achieve this: prefs:root=General.

And I could use the following line of code:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]]

But Apple no longer supports this open URL scheme since the iOS 5.1 update.

But recently I have noticed that, in the Appstore app and Safari browser etc, Apple let this happen.Please refer to the attached image where Apple shows the alert. And on clicking the Settings button, user is taken to the Settings app. Any idea, how this is done. I believe if this can be done in App Store application, there should be some way that I can do it in my application also. Please comment if someone has a fix, or more idea on how this can be done.

enter image description here

Ankur
  • 5,086
  • 19
  • 37
  • 62
shah1988
  • 2,584
  • 1
  • 19
  • 21
  • 2
    Apple can do what they want, we can't. – rmaddy May 15 '13 at 05:40
  • As of iOS 5.0 you are able to open the settings app using the `"prefs://" URL scheme`. As no way to for this with current `API`. – Buntylm May 15 '13 at 05:43
  • Yeah. This url scheme is not working any more. I was thinking there might be a different solution. The way in which Apple is letting that happen in Safari and App store application. – shah1988 May 15 '13 at 05:50
  • Sorry. I have uploaded the image. This is shown when I open the Appstore application without network connectivity. When I tap on settings it leads me to the Settings app. – shah1988 May 15 '13 at 05:52
  • Does any one found a solution or maybe a work around to have something similar? – Pedro Teran Jul 23 '13 at 16:41
  • There is actually no solution to this. This API is no more available to developers. As rmaddy said, "Apple can do what they want, we can't". – shah1988 Jul 29 '13 at 04:16
  • Though the following post talks about private API for this but this is not allowed otherwise the app will be rejected by Apple. http://stackoverflow.com/a/14587480/1926276 – AnkitJain Aug 02 '13 at 19:45

0 Answers0