Open Christina-Popova opened 6 years ago
@Christina-Popova
try this:
window.plugins.touchid.isAvailable(
function(type) {alert(type)}, // type returned to success callback: 'face' on iPhone X, 'touch' on other devices
function(msg) {alert('not available, message: ' + msg)} // error handler: no TouchID available
);
In case when device has a Touch ID or FaceID, but no fingerprints yet, isAvailable() calls the error handler with result: {"localizedDescription":"No identities are enrolled.","code":-7 }. How I can determine type of biometric ID - 'touch' or 'face' in this case? Thanks!