Categories
Featured iPhone Development Resources iOS Development Tutorials

Tutorial: Using URL Schemes To Open The Settings App To A Specific Page In iOS 5

Something that I saw mentioned back when the iOS 5 sdk was in beta was that you could use custom URL schemes to open the settings app up to a specific page.

While this capability has carried over to the iOS 5 release this capability appears to still be undocumented by Apple.

Alex Curylo has created a useful little writeup on using these URL schemes for location services, twitter, and bluetooth settings:

Turn on Location Services?

[NSURL URLWithString:@”prefs:root=LOCATION_SERVICES”]];

Set up Twitter?

[NSURL URLWithString:@”prefs:root=TWITTER”]];

Hook up a Bluetooth device?

[NSURL URLWithString:@”prefs:root=General&path=Bluetooth”]];

And one commenter on Alex’s site also mentioned how to do it for your own app:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”prefs:root=Apps&path=Your+App+Display+Name”]];

The url schemes also work just fine when linked in HTML for those browsing on their iOS devices.

Source: Alex Curylo

1 reply on “Tutorial: Using URL Schemes To Open The Settings App To A Specific Page In iOS 5”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.