我正在將TouchID集成到我的應用中。出於安全原因,我允許用戶打開和關閉它。我希望它在用戶添加新指紋時自動關閉。 據蘋果,evaluatedPolicyDomainState
TouchID - 檢測添加的新指紋 - evaluatePolicyDomainState何時更改?
This property returns a value only when the canEvaluatePolicy(:error:) method succeeds for a biometric policy or the evaluatePolicy(:localizedReason:reply:) method is called and a successful Touch ID authentication is performed. Otherwise, nil is returned.
The returned data is an opaque structure. It can be used to compare with other values returned by this property to determine whether the database of authorized fingerprints has been updated. However, the nature of the change cannot be determined from this data.
不過,我添加了新的指紋和evaluatedPolicyDomainState
保持不變。
關於如何確保evaluatedPolicyDomainState
得到更新或者是否有任何其他方式檢查是否添加新指紋?
嗨克里斯蒂安,我們也有這個requiremnet在我們的app.Can你請告訴我應該分配給oldDomainState變量? – RXGangam
當您第一次請求用戶設置touchID時,您將使用'context.evaluatePolicy'。如果成功,則獲取當前策略並將其保存到oldDomainState。 –
我已使用kSecAccessControlTouchIDCurrentSet。現在它按預期工作。 – RXGangam