naoufal / react-native-touch-id

React Native authentication with the native Touch ID popup.

Home Page:https://www.npmjs.com/package/react-native-touch-id

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read property 'isSupported' of undefined

sarray23 opened this issue · comments

This error shows up only with android emulators (iOS works fine).

I already import TouchID from 'react-native-touch-id' in my RN project.

Any idea about this issue ?

Hi, the same here, any update

This also happens on devices without any such sensor.
The exported object is undefined in that case. It should however be on object, that returns false on isSupported.
The problems are here:
https://github.com/naoufal/react-native-touch-id/blob/master/TouchID.ios.js#L17
and here
https://github.com/naoufal/react-native-touch-id/blob/master/TouchID.android.js#L7

No, since there's no updates in android folder of the project

commented

You need edit your MainApplication.java in android/app/src/main/**/
@OverRide
protected List getPackages() {
return Arrays.asList(
new AppMainReactPackage(),

  •        new FingerprintAuthPackage()
    );
    
    }

This answer won't solve the problem.