Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin does not load on mobile device ios #16

Closed
ibondoc22 opened this issue Sep 7, 2016 · 6 comments
Closed

Plugin does not load on mobile device ios #16

ibondoc22 opened this issue Sep 7, 2016 · 6 comments

Comments

@ibondoc22
Copy link

ibondoc22 commented Sep 7, 2016

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
Copy link
Owner

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

@ibondoc22
Copy link
Author

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
Copy link
Owner

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

@ibondoc22
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

ibondoc22 commented Sep 7, 2016

Thanks Eddy,

I will try this and let you know the outcome.

Edit:

Plugin worked after adding the following to the config.xml

<plugin name="cordova-plugin-touch-id" source="npm" spec="~3.2.0" />

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants