NiklasMerz / cordova-plugin-fingerprint-aio

Cordova Plugin for fingerprint sensors (and FaceID) with Android and iOS support
https://www.npmjs.com/package/cordova-plugin-fingerprint-aio
MIT License
323 stars 189 forks source link

allowBackup is not working for IOS #351

Open sudeekshachip1003 opened 3 years ago

sudeekshachip1003 commented 3 years ago

I tried to add allowBackup optional parameter for isAvailable, but isAvailable is not accepting any param. Anything else to be done to enable backup option(passcode) for IOS?

cordova-plugin-fingerprint-aio : 4.0.2 @ionic-native/fingerprint-aio : 5.33.0

dmitry-salnikov commented 3 years ago

That's rather a problem in Ionic wrapper than in the plugin - types in it are outdated and don't match the latest plugin version. In order to specify allowBackup, you can use plugin directly, e.g.:

(window as any).Fingerprint.isAvailable((result: string) => {
  resolve(result);
}, (errorObject: {code: string, message: string}) => {
  reject(new Error(errorObject.message));
}, {
  allowBackup: true
});