naoufal / react-native-touch-id

React Native authentication with the native Touch ID popup.
https://www.npmjs.com/package/react-native-touch-id
1.48k stars 477 forks source link

Device does not support TouchID error #112

Open unkownymouse opened 6 years ago

unkownymouse commented 6 years ago

I'm getting Device does not support TouchID error when I ran TouchID.isSupported()

componentWillMount() {
        //Determine Biometric Type
        TouchID.isSupported()
            .then(biometryType => {
                if (biometryType === 'FaceID') {
                    console.log('FaceID');
                } else {
                    console.log('TouchID');
                }
            })
            .catch(error => {
                // Failure code
                console.log(error);
            });
}

I'm getting this error message in the console:

screen shot 2018-04-07 at 8 57 58 am

System Info:

"react": "16.3.1", "react-native": "0.54.4", "react-native-touch-id": "^4.0.1",

macOS High Sierra: 10.13.4 Xcode: Version 9.3 (9E145) with Swift 4.0.3


Tested on:

iPhone X (Physical device) iPhone X (Simulator) iPhone 8 (Simulator)

frmrgr commented 6 years ago

I had the same issue because I had my simulator left open from xcode 9.0, so it had ios 11.0. I quit simulator app and launched it back from new xcode (in my case 9.0.1), this time it had ios 11.0.1, and face id worked.

unkownymouse commented 6 years ago

@frmrgr I also tried that. I restarted iPhone Simulator and again started it from Terminal(Mostly I launch the simulator from Terminal).

My simulator and physical device iOS is 11.3. I also tried to delete node_modules and npm install then react-native link. Then I deleted the app from device and again installed it freshly. Even after this, it is showing the same error.

muresanandrei commented 6 years ago

I've also got this error does anyone know a fix ?

rdev commented 6 years ago

When you try wrong fingerprints a bunch of times on lock screen, it disables the sensor and asks you to use a passcode.

Turns out this also works if you fail to authenticate inside the apps And when that happens, until you lock your phone and unlock with a passcode, it returns RCTTouchIDNotSupported.

Lock your phone, unlock with a passcode and relaunch your app.

Got me for about 20 minutes -_-

wl05 commented 6 years ago

has anyone solved this this problem ?

GibranPolonsky commented 6 years ago

I had the same problem but was because i hadn't registered a fingerprint yet.

JslinSir commented 6 years ago

When device fingerprint identification is supported, if the "RCTTouchID NotSupported" message is reported, we can consider the number of times exceeded the limit

chengsam commented 6 years ago

@rdev You're right, but the error is quite misleading, hope the error can be logged more clearly.

jpellissari commented 5 years ago

Hello guys, I had the same error message. It was a simple step that is not listed anywhere. I'm using xcode 10.1 and simulator with iOS 12.1

Open the simulator and go to the menu "Hardware/Face ID(Touch ID)", there is an option called "enrolled", make sure this option is checked and try again!