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

Face/Touch ID prompt not displaying on iOS Simulator #69

Open
TomSeldon opened this issue Nov 15, 2018 · 2 comments
Open

Face/Touch ID prompt not displaying on iOS Simulator #69

TomSeldon opened this issue Nov 15, 2018 · 2 comments

Comments

@TomSeldon
Copy link

I'm having an issue, where on the iOS simulator when I call window.plugins.touchid.verifyFingerprint it is calling the success callback but not actually showing the Face/Touch ID prompt.

I may have misunderstood how this is meant to work on a simulator, but my understanding was that I should:

  • Open the "Hardware" drop down menu
  • Open the "Face/Touch ID" section (dependent on device)
  • Click "Enrolled" (so it shows a tick next to that menu item)
  • On calling verifyFingerprint it should show the prompt, and I should select "Matching face" or "Non-matching face" from that same menu (or the equivalent for TouchID).

Instead, assuming I have already ticked "Enrolled", it doesn't show the prompt, and calls the success callback.

I thought this may be an issue with my app, so I started a new Cordova project, installed this plugin, and tried again there, but I get the same issue.

Example code:

# Terminal
npm i -g ionic cordova
ionic start "Test app" blank --type=angular --cordova

cd test-app

ionic cordova plugin add cordova-plugin-touch-id --variable FACEID_USAGE_DESCRIPTION="For easy authentication"

# run app in iOS simulator
// Run from Safari console attached to iOS emulator

window.plugins.touchid.isAvailable(console.log, console.error);
// logs `'face'`

window.plugins.touchid.didFingerprintDatabaseChange(console.log, console.error);
// logs `false`

window.plugins.touchid.verifyFingerprint('Some message...', console.log, console.error);
// logs `null`

///////

function onSuccess() { console.log('success') }

window.plugins.touchid.verifyFingerprint('Some message...', onSuccess, console.error);
// logs `'success'`
@yornel13
Copy link

Do you solved? I have same issue

@cvinodhkumar77
Copy link

TouchID and FaceID will not work in simulators. Please try in real device

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

3 participants