Skip to content

Instantly share code, notes, and snippets.

@adhithiravi
Last active September 19, 2018 04:28
Show Gist options
  • Save adhithiravi/d23f0ac58f7e10c8dd7a25f839c8eed9 to your computer and use it in GitHub Desktop.
Save adhithiravi/d23f0ac58f7e10c8dd7a25f839c8eed9 to your computer and use it in GitHub Desktop.
Show an example usage of isSupported()
clickHandler() {
TouchID.isSupported()
.then(biometryType => {
// Success code
if (biometryType === 'FaceID') {
console.log('FaceID is supported.');
} else if (biometryType === 'TouchID'){
console.log('TouchID is supported.');
} else if (biometryType === true) {
// Touch ID is supported on Android
}
})
.catch(error => {
// Failure code if the user's device does not have touchID or faceID enabled
console.log(error);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment