|
@@ -25,20 +25,14 @@ final class BaseUnlockManager: UnlockManager {
|
|
|
|
|
|
|
|
let reason = "We need to make sure you are the owner of the device."
|
|
let reason = "We need to make sure you are the owner of the device."
|
|
|
|
|
|
|
|
- if context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) {
|
|
|
|
|
- context.evaluatePolicy(
|
|
|
|
|
- .deviceOwnerAuthenticationWithBiometrics,
|
|
|
|
|
- localizedReason: reason,
|
|
|
|
|
- reply: handler
|
|
|
|
|
- )
|
|
|
|
|
- } else if context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) {
|
|
|
|
|
|
|
+ if context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) {
|
|
|
context.evaluatePolicy(
|
|
context.evaluatePolicy(
|
|
|
.deviceOwnerAuthentication,
|
|
.deviceOwnerAuthentication,
|
|
|
localizedReason: reason,
|
|
localizedReason: reason,
|
|
|
reply: handler
|
|
reply: handler
|
|
|
)
|
|
)
|
|
|
} else {
|
|
} else {
|
|
|
- promise(.failure(UnlockError(error: error)))
|
|
|
|
|
|
|
+ handler(true, nil)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.eraseToAnyPublisher()
|
|
.eraseToAnyPublisher()
|