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
相关产品推荐
相关产品推荐

