I've recently discovered the awesome iOS5 custom Settings URL Scheme, which can be explained in detail at this great website.
I've found this to work, directing the user to the Settings app from my application:
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:@"prefs:root=General"]];
But cannot seem to route directly to the Restrictions path via the path
parameter:
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:@"prefs:root=General&path=Restrictions"]];
Has anyone found documentation on this or been able to make this work?
Any insight would be greatly appreciated. I'm trying to take the user to enable in-App purchasing, and would rather not have the user manually click on Restrictions (not very obvious).
Yep, saw this (and many more), even implemented it in a test application. Really need to get the definitive word from Apple, but the community consensus opinion is Apple disallowed it in 5.1 after it was publicly "discovered/published", so applications containing it won't be accepted.
08/01/12 Update: Asked Apple through my developer account if there is a way to programmatically launch the WiFi Settings dialog. Here is the response:
iOS 10
Use
app-prefs:
See gist
As of iOS10 you can use
to open general settings.
also you can add known urls(you can see them in the most upvoted answer) to it to open specific settings. For example the below one opens touchID and passcode.
In iOS 9 it works again!
To open Settings > General > Keyboard, I use:
Moreover, it is possible to go farther to Keyboards:
As of iOS8 you can open the built-in Settings app with:
The actual URL string is
@"app-settings:"
. I tried appending different sections to the string ("Bluetooth", "GENERAL", etc.) but seems only linking to the main Settings screen works. Post a reply if you find out otherwise.Here is something else I found:
After I have the "prefs" URL Scheme defined, "prefs:root=Safari&path=ContentBlockers" is working on Simulator (iOS 9.1 English), but not working on Simulator (Simplified Chinese). It just jump to Safari, but not Content Blockers. If your app is international, be careful.
Update: Don't know why, now I can't jump into ContentBlockers anymore, the same code, the same version, doesn't work now. :(
On real devcies (mine is iPhone 6S & iPad mini 2), "Safari" should be "SAFARI", "Safari" not working on real device, "SAFARI" now working on simulator:
So far, did not find any differences between iPhone and iPad.