You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

iOS 18下React Native FaceID调用失效问题求助(react-native-biometrics)

iOS 18下react-native-biometrics/react-native-touch-id FaceID验证失败(错误Code=-1000)

我在使用已停止维护的react-native-biometrics库时遇到了iOS版本兼容问题,react-native-touch-id库也出现完全相同的状况:

  • iOS 17.4系统中FaceID功能正常,调用simplePrompt后会正常等待人脸验证
  • 升级到iOS 18后,控制台抛出以下错误:
Error Domain=com.apple.LocalAuthentication Code=-1000 "UI service connection invalidated."
UserInfo={NSDebugDescription=UI service connection invalidated., NSLocalizedDescription=Authentication failed.}
  • FaceID的验证弹窗仅显示几毫秒就消失,直接判定为用户未提供生物识别信息,导致真实设备上用户无法通过FaceID完成登录
  • 同时调用rnBiometrics.biometricKeysExist()时,返回内容为Keys do not exist or were deleted

我的simplePrompt调用代码如下:

const rnBiometrics = new ReactNativeBiometrics();
try {
    const { success, error } = await rnBiometrics.simplePrompt({
      promptMessage: 'Confirm fingerprint',
      cancelButtonText: 'Cancel',
    });

    if (success) {
      Logger.log('Successful biometrics provided');
    }
    if (error) {
      Logger.log(`Biometrics prompt error: ${error}`);
    }

    return success;
  } catch (e) {
    Logger.error('Biometrics prompt failed with exception: ', e);
    return false;
  }

想问下有没有其他开发者遇到过这个相同的问题?

内容的提问来源于stack exchange,提问作者Radek Mezuláník

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 02:50:04