1

我写了下面的代码,但是当人脸ID认证失败时,人脸ID没有显示“kLAErrorAuthenticationFailed”,这是为什么呢?

{
    case kLAErrorAuthenticationFailed://-- Pass the test(sensor is working)
        NSLog(@"kLAErrorAuthenticationFailed");
        errorReason=@"Error Authentication Failed";
        break;
    case kLAErrorPasscodeNotSet://-- Skip test
        NSLog(@"kLAErrorPasscodeNotSet");
        errorReason=@"Error Passcode Not Set";
        break;
    case kLAErrorSystemCancel://-- Failed
        NSLog(@"kLAErrorSystemCancel");
        errorReason=@"Error System Cancel";
        break;
        // ***** Deprecate Method from iOS 11
        /*
    case kLAErrorTouchIDNotAvailable://-- Skip test
        NSLog(@"kLAErrorTouchIDNotAvailable");
        errorReason=@"Error Touch ID Not Available";
        break;
         */
    case kLAErrorBiometryNotAvailable://-- Skip test
        NSLog(@"kLAErrorBiometryNotAvailable");
        errorReason=@"Error Biometric Sensor Not Available";
        break;

        // ***** Deprecate Method from iOS 11
      /*
    case kLAErrorTouchIDNotEnrolled://-- Skip test// guide user to enroll the touch id
        NSLog(@"kLAErrorTouchIDNotEnrolled");
        errorReason=@"Error Touch ID Not Enrolled";
        break;
        */
    case kLAErrorBiometryNotEnrolled://-- Skip test// guide user to enroll the touch id
        NSLog(@"kLAErrorBiometryNotEnrolled");
        errorReason=@"Error Biometry Not Enrolled";
        break;
    case kLAErrorUserCancel://-- Skip test
        NSLog(@"kLAErrorUserCancel");
        errorReason=@"Error User Cancel";
        break;
    case kLAErrorUserFallback://-- Skip test
        NSLog(@"kLAErrorUserFallback");
        errorReason=@"Error User Fallback";
        break;
    case kLAErrorInvalidContext://-- Skip test
        NSLog(@"kLAErrorInvalidContext");
        errorReason=@"Error Invalid Context";
        break;
    case kLAErrorAppCancel://-- Skip test
        NSLog(@"kLAErrorAppCancel");
        errorReason=@"Error AppCancel";
        break;

        // ***** Deprecate Method from iOS 11
        /*
         case kLAErrorTouchIDLockout://-- Skip test
         NSLog(@"kLAErrorTouchIDLockout");
         errorReason=@"Error TouchIDLockout";
         break;
         */
    case kLAErrorBiometryLockout://-- Skip test
        NSLog(@"kLAErrorBiometryLockout");
        errorReason=@"Error Biometry Lockout";
        break;

    default:
        NSLog(@"default kLAErrorBiometryNotAvailable");
        errorReason=@"kLAErrorBiometryNotAvailable";
        break;
}
4

0 回答 0