SelfLender / react-native-biometrics

React Native module for iOS and Android biometrics
MIT License
664 stars 228 forks source link

ReactNativeBiometrics.isSensorAvailable got 2 arguments, expected 3 #192

Closed agussproutasia closed 2 years ago

agussproutasia commented 2 years ago

Hi Guys, i have some issue when i build with ms appcenter ci/cd the apps crash when runing biometric function, but when i build with my local laptop everything is normal, can you help me guys?

Screen Shot 2022-06-20 at 10 58 50

here the function: export const BiometricAvailability = async () => { const {available, biometryType, error} = await ReactNativeBiometrics.isSensorAvailable(); if (available && biometryType === ReactNativeBiometrics.TouchID) { return true; } else if (available && biometryType === ReactNativeBiometrics.FaceID) { return true; } else if (available && biometryType === ReactNativeBiometrics.Biometrics) { return true; } else { console.log('Biometrics not supported', error); return false; } };

here when i call the function: const isBiometricAvailable = await BiometricAvailability();

jayfunk commented 2 years ago

Refer to this thread for details on how to resolve. https://github.com/SelfLender/react-native-biometrics/issues/191#issue-1271654197