The “prefs” URL Scheme is not working in iOS 10 (Beta 1 & 2)

Just replace prefs to App-Prefs for iOS 10

Below code works for iOS 8,9,10

Swift 3.0 and Xcode >= 8.1

if #available(iOS 10.0, *)
{
       UIApplication.shared.openURL(URL(string: "App-Prefs:root=SOMETHING")!)
}
else
{
       UIApplication.shared.openURL(URL(string: "prefs:root=SOMETHING")!)
}

Swift 2.2

if #available(iOS 10.0, *)
{
      UIApplication.sharedApplication().openURL(NSURL(string:"App-Prefs:root=SOMETHING")!)
}
else
{        
    UIApplication.sharedApplication().openURL(NSURL(string:"prefs:root=SOMETHING")!)
}

Works for me.

Happy Coding 😊

Leave a Comment