2

When I click on the About page in the settings, an error message is displayed:

2016-11-25 19:49:04.352 ass176[4729:186745] -canOpenURL: failed for URL: "prefs:root=General&path=About" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

This is the code:

let url = URL(string: "prefs:root=General&path=About")

if UIApplication.shared.canOpenURL(url!){
     UIApplication.shared.open(url!, options: [:], completionHandler: nil)
}

Environment: iOS 10.1, XCode 8.1

enter image description here

Jerry
  • 966
  • 2
  • 13
  • 28
Aaron
  • 55
  • 2
  • 9
  • 3
    Opening prefs URLs aside from your own app settings is not permitted and will result in a rejection for private API use – Paulw11 Nov 25 '16 at 12:24

2 Answers2

1

Apparently, it's not permitted anymore. You'll have to use UIApplicationOpenSettingsURLString for your own app settings.

You can read @Paulw11 answer here: Answer

Community
  • 1
  • 1
Arpit Dongre
  • 1,683
  • 19
  • 30
0

Error code 10814 tells that.

No application in the Launch Services database matches the input criteria.

You can get it by link

The solution i prefer is Try Reset the simulator. And re-run the project.

Community
  • 1
  • 1
Saranjith
  • 11,242
  • 5
  • 69
  • 122