Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
402 views
in Technique[技术] by (71.8m points)

使用touchid 时弹出的提示框为什么没有“输入密码”这一项?

我使用了touchuid 功能,但是在弹出的提示框里只有使用指纹而没有输入密码的选项。

clipboard.png

  LAContext *context = [[LAContext alloc]init];
    NSError *err;
    if([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:&err]){
        [context evaluatePolicy:LAPolicyDeviceOwnerAuthentication
                localizedReason:@"此操作需要授权,请输入解锁密码或使用指纹授权"
                          reply:^(BOOL success, NSError * _Nullable error) {
                              if (error) {
                                  if ( error.code == LAErrorAuthenticationFailed || error.code == LAErrorSystemCancel) {
                                      dispatch_async(dispatch_get_main_queue(), ^{
                                          UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil
                                                                                         message:@"授权出错"
                                                                                        delegate:nil
                                                                               cancelButtonTitle:@"确定"
                                                                               otherButtonTitles:nil, nil];
                                          [alert show];
                                      });
                                  }
                                  
                              }
                              if (success) {
                                  dispatch_async(dispatch_get_main_queue(), ^{
                                    
                                 
                                  
                              }
                          }];
    }else{
        NSLog(@"touch id not available");
    }

不管用LAPolicyDeviceOwnerAuthentication 还是
LAPolicyDeviceOwnerAuthenticationWithBiometrics 都是这样。
怎么样能有下图中的enter password的选项?
clipboard.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

iOS8.3以后好像就没有了,不过Touch ID输错一次后会显示”输入密码“

Show “Enter Password” for Touch ID authentication

图片描述


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...