Cannot Launch Touch ID & Passcode with URL Schema in iOS 11 using swift

问题内容:

I’m using below code to navigate to the Touch ID and Passcode section using swift,

guard let profileUrl = URL(string : "App-Prefs:root=TOUCHID_PASSCODE") else {
            return
}

if UIApplication.shared.canOpenURL(profileUrl){
     if #available(iOS 10.0, *) {
                UIApplication.shared.open(profileUrl, options: [:], completionHandler: nil)
            } else {
                // Fallback on earlier versions
         }
 }

It worked properly with iOS 10. but this doesn’t work now. it navigates only to the Settings, not to the Touch ID & Passcode section. any reason for this.

问题评论:

From ios 11 – The Settings URL scheme will only launch the Settings app Screen. It won’t open any particular section any more.
Prefs urls have been considered private for some time. You can only open your own app’s preferences

答案:

答案1:

Apple has removed that functionality from the Settings app. Your only choice to keep these functional would be to remain on iOS 10.

From iOS 11 you can Only call Main Setting Screen,

guard let profileUrl = URL(string : "App-Prefs:") else {
        return
}

答案评论:

原文地址:

https://stackoverflow.com/questions/47750211/cannot-launch-touch-id-passcode-with-url-schema-in-ios-11-using-swift

添加评论

友情链接:蝴蝶教程