Using TouchID on emulator

14,444

Solution 1

Yes is possible!

With the simulator open you click in Hardware -> Touch ID Enrolled to make the Touch ID active

Touch ID Enrolled

To test the Touch ID you go in Hardware -> Simulate Finger Touch -> Matching or Non-Matching

Simulate Finger Touch

Solution 2

Anyone who is using latest Xcode (version 12x), there is no Hardware menu, it's been replace by 'Feature`. So to enroll the touch id,

  1. Open simulator
  2. Go to Features -> Touch Id -> Enrolled

enter image description here

Share:
14,444
Mourad Idrissi
Author by

Mourad Idrissi

Software Engineer Passionate about new technologies Part-Time Superhero

Updated on July 11, 2022

Comments

  • Mourad Idrissi
    Mourad Idrissi almost 2 years

    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 ?

  • Mourad Idrissi
    Mourad Idrissi over 7 years
    I have the version: 10.0 (SimulatorApp-726.7) When you click on : Hardware > Touch ID > Matching Touch, there's nothing happen
  • José Neto
    José Neto over 7 years
    The Touch ID question is on the screen of the simulator? If yes, can you show me the code you are using to see if is matching?
  • Mourad Idrissi
    Mourad Idrissi over 7 years
    I can't paste all the code here, I put it as an answer :)
  • Rohit Singh
    Rohit Singh over 2 years
    Extending the answer. For new devices you will see Face ID in place of Touch ID.
  • Chris
    Chris over 2 years
    Weird ... mine only has Face ID in the Features menu ...
  • Sebitas Sg
    Sebitas Sg about 2 years
    Try using a touch id phone, like an iPhone 8