目前,我有以下代码。
if localAuthenticationContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &authError) {
localAuthenticationContext.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: reasonString) { success, evaluateError in
if success {
self.performSegue(withIdentifier: "settingChange", sender: self) //TODO: User authenticated successfully, take appropriate action
如果触摸 id 已正确验证,则代码执行到另一个视图控制器的 segue,但是当我尝试代码时,我收到此错误:
我在不使用 TouchID 的情况下尝试了代码,它工作正常,但我不知道为什么它在使用 TouchID 时会产生错误。有人可以帮忙吗?