2
當我點擊設置關於頁上,將顯示一條錯誤消息:不能跳轉到系統設置頁面
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.)"
這是代碼:
let url = URL(string: "prefs:root=General&path=About")
if UIApplication.shared.canOpenURL(url!){
UIApplication.shared.open(url!, options: [:], completionHandler: nil)
}
環境:iOS版10.1,8.1的XCode
開幕首選項從自己的應用程序設置的URL一邊是不允許的,並會導致對私有API使用的拒絕 – Paulw11