0

I am using this plugin https://github.com/EddyVerbruggen/cordova-plugin-touch-id on my app. When I call the methods, the callbacks are not called until I focus out the app and bring it back in focus. I have seen this same problem with two different plugins. Is this a cordova ios bug or is there some thing that I need to do?

window.plugins.touchid.isAvailable(
  function(type) {alert(type)}, // this will not be called until I focus out and back in the app
  function(msg) {alert('not available, message: ' + msg)} // this will not be called until I focus out and back in the app
);

Your help is appreciated!

Kubwimana Adrien
  • 2,463
  • 2
  • 8
  • 11
  • Are you compiling the app for Android as well and this is not happening there? – Jose Rojas Dec 14 '17 at 23:29
  • See [this question & answer](https://stackoverflow.com/q/38410159/777265) - pretty sure this is your problem – DaveAlden Dec 15 '17 at 06:35
  • @DaveAlden the question is the same, the answer not quite as he posted his CSP on cordova slack and he has the `gap:` on `default-src` already. The problem is he also has a `frame-src` entry. In that case the `gap:` should go there instead of on the `default-src` as `gap:` is used in an iframe. Maybe it's something you can add to your answer to improve it. – jcesarmobile Dec 15 '17 at 12:44
  • Right @DaveAlden @jcesarmobile I had the ```frame-src``` and added the ```gap:``` there and it worked. Thank you! – Kubwimana Adrien Dec 15 '17 at 14:50

0 Answers0