Open App Settings in iOS 8

Apple, Y is this so poorly documented?

1. Add a key to your app-info.plist file called UIApplicationOpenSettingsURLString

2. Set the value of this key to “app-settings:”

3. In your code, access this value as a global constant:

NSString *const UIApplicationOpenSettingsURLString

in Objective-C, and

let UIApplicationOpenSettingsURLString: NSString!

in Swift

4. Use this global constant like so :

[UIApplication sharedApplication] openURL:[NSURL URWithString: UIApplicationOpenSettingsURLString]]

in Objective C and

UIApplication.sharedApplication().openURL(NSURL(UIApplicationOpenSettingsURLString))

in Swift.

Use canOpenURL: to test if this is possible during run time. It is not possible on iOS 7. I also wonder if there are paths you can add after “app-settings:” to open specific app settings screens such as privacy. Please leave a comment if you have any information on this.

1 thought on “Open App Settings in iOS 8”

Leave a Reply

Your email address will not be published. Required fields are marked *