Closed MaximeConan closed 5 years ago
Judging from the changes in https://github.com/naoufal/react-native-touch-id/commit/e1d3ab985366edc69732f908efdd7e6e2b9e10a3, it looks like instead of:
TouchID.isSupported(callback)
You should now call:
TouchID.isSupported(config, callback)
For example:
TouchID.isSupported({}, (error, biometryType) => {
console.log({
error,
biometryType,
})
})
Hope this helps.
Hey thanks for your help @jorisw , unfortunately I'have still the same error using your snippet 😢
To resolve my issue I have change my code to this :
import { NativeModules } from 'react-native'
const NativeTouchID = NativeModules.TouchID
const result = new Promise((resolve, reject) => {
NativeTouchID.isSupported((error, biometryType) => {
if (error) {
return reject(createError(config, error.message))
}
resolve(biometryType)
})
})
So I use directly isSupported
method on the NativeTouchID, works perfectly if it can helps someone 👍
Hello,
I have the following error using your library :
Runtime Exception: TouchID.isSupported was called with 1 arguments but expects 2 arguments.
.I have try to reset my cache, delete and reinstalle my
node_modules
but anything works. I'm using the4.4.1
version.