我在我的 2 个应用程序中使用 Expo Local Authentication 指纹传感器。这两个应用程序都在 android 中检测指纹,但在 IOS 中行为不端。当我在 IOS 中安装这两个应用程序时,最后安装的 IPA 将正确检测指纹传感器,但第一个安装的 IPA 不会触发传感器,甚至没有显示任何弹出窗口“扫描你的手指。”。但这一切都在Android中运行。
const signInTouch = async () => {
try{
let result = await LocalAuthentication.authenticateAsync(
{promptMessage:'Scan your finger.'}
);
console.log('Scan Result:', result);
if(result.success){
navigation.navigate('HomePage');
}
}
catch(error){
console.log(error);
Alert.alert('error', error.toString());
}
}