Using mergLA - iOS Touch ID
mergLA is an iOS external that adds a command to present a local authentication dialog to the user if they have setup biometric authentication.
To present the authentication dialog use the mergLAEvaluate command.
command authenticateUser mergLAEvaluate "Place your finger on the Home button to log in to MyApp" if the result is "success" then loginUser else answer "Error:" & the result end if end authenticateUser
An authentication dialog will be presented to the user.
The result will be one of
- user cancelled
- system cancelled
- can not evaluate
- not available on this system version
You can take action depending on the result of mergLAEvaluate.
You can test Touch ID on the simulator.
First ensure Touch ID is enrolled by Choosing Hardware -> Touch ID -> Enrolled.
Now run Touch ID in your app and when you are presented with the dialog choose either
Hardware -> Touch ID -> Matching Touch (to simulate a recognised touch)
Hardware -> Touch ID -> Non-matching Touch (to simulate a non-recognised touch)
If a Matching Touch is simulated mergLAEvaluate will return "success".
If a Non-matching Touch is simulated mergLAEvaluate will show a Try Again dialog allowing the user to Try Again, Enter Password or Cancel.