I'm trying to use TouchID within my Ionic 2 app. I have an iphone 5c, so I can't test it on real device.
I imported the package :
import { TouchID } from 'ionic-native';
Then, I tested the first function (I already activated touchID in the hardware section of the emulator):
TouchID.isAvailable()
.then(
res => console.log('TouchID is available!'),
err => console.error('TouchID is not available', err)
);
Everything works fine. Now what I would like to do, is testing this function :
TouchID.verifyFingerprint('Scan your fingerprint please')
.then(
res => console.log('Ok', res),
err => console.error('Error', err)
);
It's possible to test it on emulator ? The emulator can listen to fingerprint action ?
Yes is possible!
With the simulator open you click in Hardware -> Touch ID Enrolled to make the Touch ID active
To test the Touch ID you go in Hardware -> Simulate Finger Touch -> Matching or Non-Matching