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).
I wanted to open the Bluetooth Menu in the Settings Application and the above path (prefs:root=General&path=Bluetooth) didn't work for me. What ended up working for me was
Make sure you have the
prefs
URL Scheme defined first.Solution for iOS10. Works fine.
Update:
prefs:
will NOT work since iOS 10.If you add the prefs URL scheme to your iOS app, it will allow you to use all those schemes that we could in iOS 5. I've tested it on iOS 9, but I think it will work on older versions too.
I am updating one news here. Using 'prefs:' only is NOT rejected by Apple, I tested it and checked approved to the app store(in Aug, 2016). thx.
AS @Nix Wang's ANSWER THIS IS NOT WORK IN IOS 10
WARNING: This method will not work for devices running iOS 5.1 and greater - See Hlung's comment below.
It's possible that the
path
component has a different name than the actual section, but it's also possible that you can't currently access that section straight from a URL. I found a list of possible URLs and Restrictions is not on it, maybe it's just not found out yet.List of currently known URLs in the Settings app: