Browse Source

edit policy of biometric authentication

pull/1/head
james 6 years ago
parent
commit
857cfb85ff
  1. 8
      GMERemittance/Module/BiometricAuthentication/User Interface/Wireframe/BiometricAuthenticationWireframe.swift

8
GMERemittance/Module/BiometricAuthentication/User Interface/Wireframe/BiometricAuthenticationWireframe.swift

@ -13,6 +13,8 @@ class BiometricAuthenticationWireframe {
weak var view: UIViewController!
var completion: ((String?) -> ())?
var information: String?
var policy: LAPolicy = .deviceOwnerAuthentication
}
extension BiometricAuthenticationWireframe: BiometricAuthenticationWireframeInput {
@ -40,10 +42,10 @@ extension BiometricAuthenticationWireframe: BiometricAuthenticationWireframeInpu
var error: NSError?
let msg = "Confirm your fingerprint or face to authenticate."
let deviceAuth = LAPolicy.deviceOwnerAuthentication
// let deviceAuth = LAPolicy.deviceOwnerAuthenticationWithBiometrics
if context.canEvaluatePolicy(deviceAuth, error: &error) {
context.evaluatePolicy(deviceAuth, localizedReason: msg, reply: { (success, err) in
if context.canEvaluatePolicy(policy, error: &error) {
context.evaluatePolicy(policy, localizedReason: msg, reply: { (success, err) in
if success {
DispatchQueue.main.async {
self.completion?(nil)

Loading…
Cancel
Save