ios - 使用touchid 时弹出的提示框为什么没有“输入密码”这一项?
PHPz
PHPz 2017-04-18 09:57:08
0
1
612

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

  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的选项?

PHPz
PHPz

学习是最好的投资!

répondre à tous(1)
左手右手慢动作

Il semble qu'il n'existera plus après iOS 8.3, mais si Touch ID est mal saisi une fois, il affichera "Entrer le mot de passe"

Afficher « Entrer le mot de passe » pour l'authentification Touch ID

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal