简体   繁体   中英

Expo Local Authentication Finger print sensor not working in IOS

I am using Expo Local Authentication finger print sensor in my 2 applications. Both these apps detecting finger print in android, but misbehaving in IOS. When I install both apps in IOS, the last installed IPA will detect the finger print sensor correctly, but the first installed IPA does not trigger the sensor and it does not even show any popup "Scan your finger.". But its all working in 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());
  }

}

Okay finally I solved it.!! My both apps were using expo sdk 38 and react-native sdk 38. I just downgraded only one app to

“expo”: “^36.0.0”,

“react-native”: “https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz”

the other app still using sdk 39. and then I removed the node_modules and package-lock.json from the downgraded app.

sudo rm -rf./node_modules && sudo rm -rf package-lock.json

and then I Installed new modules in it

npm i

solved some compatible warning of libraries by doing

expo install “Library name”

Built the app, and installed both apps and it worked.:. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM