EddyVerbruggen / cordova-plugin-touch-id

:nail_care: 👱‍♂️ Forget passwords, use a fingerprint scanner!
MIT License
214 stars 72 forks source link

Plugin does not load on mobile device ios #16

Closed ibondoc22 closed 8 years ago

ibondoc22 commented 8 years ago

when installing the plugin using npm or github

$ cordova plugin add cordova-plugin-touch-id`
$ cordova prepare

or

$ cordova plugin add https://github.com/EddyVerbruggen/cordova-plugin-touch-id
$ cordova prepare

using cordova browser the plugin seems to work, but for mobile device (iPhone 6, iOs 9) the plugin does not seem to load at all.

Thanks,

EddyVerbruggen commented 8 years ago

So what have you tried to fix it, and how exactly are you testing it?

ibondoc22 commented 8 years ago

Hi Eddy,

tried adding this in my index.html

<button onclick="window.plugins.touchid.isAvailable(function(msg) {alert('ok: ' + msg)}, function(msg) {alert('not ok: ' + msg)})">Touch ID available?</button>
<button onclick="window.plugins.touchid.verifyFingerprint('Scan your fingerprint please', function(msg) {alert('ok: ' + msg)}, function(msg) {alert('not ok: ' + JSON.stringify(msg))})">Scan fingerprint</button>

also tried

window.plugins.touchid.isAvailable(
  function() {alert('available!')}, // success handler: TouchID available
  function(msg) {alert('not available, message: ' + msg)} // error handler: no TouchID available
);

on browser both examples are loading and throwing the error no touchid available, but when testing it with iPhone 6 / iOs9 no feedback at all.

EddyVerbruggen commented 8 years ago

That first button should work fine indeed. You are including cordova.js and run as a standalone app (not a companion app)?

ibondoc22 commented 8 years ago

i am currently trying to make it work using the Phonegap development app, but also tried it after building it in build.phonegap.com

cordova.js is included on my index.html

EddyVerbruggen commented 8 years ago

The developer app won't work as it doesn't ship with the Touch ID plugin AFAIK.

PhoneGap Build should work, but you must include the plugin in config.xml..

ibondoc22 commented 8 years ago

Thanks Eddy,

I will try this and let you know the outcome.

Edit:

Plugin worked after adding the following to the config.xml

`

`

Thanks,