Add static constants

This commit is contained in:
ismailgulek
2020-09-28 18:12:56 +03:00
parent 7ab71f6113
commit ab9cc7655e
2 changed files with 16 additions and 0 deletions
@@ -59,6 +59,16 @@ final class PinCodePreferences: NSObject {
return BuildSettings.notAllowedPINs
}
/// Maximum number of allowed pin failures when unlocking, before force logging out the user
var maxAllowedNumberOfPinFailures: Int {
return BuildSettings.maxAllowedNumberOfPinFailures
}
/// Maximum number of allowed biometrics failures when unlocking, before fallbacking the user to the pin
var maxAllowedNumberOfBiometricsFailures: Int {
return BuildSettings.maxAllowedNumberOfBiometricsFailures
}
var isBiometricsAvailable: Bool {
return LAContext().canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: nil)
}