Ionic-V4 with Touch Id Plugin


#1

Hi Team,

I am working on Ionic 4 and try to use Touch Id plugin, but it is showing error (plugin not installed) once i am using it into app. Please help i spent too much time to resolve it.

Thanks


#2

Hi,

Can you show the way you use the plugin.
How do you you imported it ?.
How did you installed it ?
Did you used :

$ ionic cordova plugin add cordova-plugin-touch-id
$ npm install --save @ionic-native/touch-id

What is the version of the plugin in your package.json ?

Root14


#3

Yes i am following the same command to install the plugin and for node module i am using “@5.0.0-beta.14” as normal node module is not working in v4.

Here is version of the plugin in package.json

@ionic-native/keychain-touch-id”: “^5.0.0-beta.14”,
@ionic-native/touch-id”: “^5.0.0-beta.14”

Both the plugin touch-id and keychain-touch-id are not working with v4.

Thanks


#4

hi,

i tried to install this plugin on a blank project, the install command come with the 4.15.0 version by default.

I had to change this line “@ionic-native/touch-id”:"^4.15.0" to “@ionic-native/touch-id”:“5.0.0-beta.21”
=> npm install

Then everything work :

import { TouchID } from '@ionic-native/touch-id/ngx';

constructor(private touchId: TouchID) { }

...

this.touchId.isAvailable()
  .then(
    res => console.log('TouchID is available!'),
    err => console.error('TouchID is not available', err)
  );

this.touchId.verifyFingerprint('Scan your fingerprint please')
  .then(
    res => console.log('Ok', res),
    err => console.error('Error', err)
  );

#5

Hello,

Thanks buddy it’s working now. I was using wrong version i think 5.0.0-beta.14.
Is there any document where i can check the correct version for plugins for ionic 4?

Thanks Again for your help!!


#6

Hi,
I am glad to have been able to help.

You can follow the releases on the github page : https://github.com/ionic-team/ionic-native/releases

Don’t forget to change this topic state as solved :slight_smile:

Root14


#7

Hi,

Today i am again having the problem into touchid plugin , now he is saying

“class not found” , i am following all the above setup suggested by you. I am checking into vivo v9.

Earlier i was checking in iphone.

Also would you please help into my 2 more points?

  1. How i verify pin of phone , if touch id is not available. I am using pin Dialog and Pin Check plugin to check is pin setup and prompt dialog of pin, but there us no option to verify the correct pin, how i can achieve that?

  2. How i can close app if user click cancel in touch id, as into ionic 3 “ExistApp” is not working.


#8

Hey Buddy,

Please help to reply over above issues.