Skip to content

Commit 2fa7288

Browse files
committed
Revert "Use the latest LAPolicy for iOS9+ which allows a fallback to using the device pin code"
This reverts commit 98f6378.
1 parent 754d5f4 commit 2fa7288

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

LTHPasscodeViewController/LTHPasscodeViewController.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,13 +353,8 @@ - (void)_setupFingerPrint {
353353
if (!self.biometricsContext && _allowUnlockWithBiometrics && !_useFallbackPasscode) {
354354
self.biometricsContext = [[LAContext alloc] init];
355355

356-
LAPolicy policy = LAPolicyDeviceOwnerAuthenticationWithBiometrics;
357-
if (@available(iOS 9.0, *)) {
358-
policy = LAPolicyDeviceOwnerAuthentication;
359-
}
360-
361356
NSError *error = nil;
362-
if ([self.biometricsContext canEvaluatePolicy:policy error:&error]) {
357+
if ([self.biometricsContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
363358
if (error) {
364359
return;
365360
}
@@ -375,7 +370,7 @@ - (void)_setupFingerPrint {
375370
_animatingView.hidden = YES;
376371

377372
// Authenticate User
378-
[self.biometricsContext evaluatePolicy:policy
373+
[self.biometricsContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
379374
localizedReason:LTHPasscodeViewControllerStrings(self.biometricsDetailsString)
380375
reply:^(BOOL success, NSError *error) {
381376

0 commit comments

Comments
 (0)