0.0.14 • Published 6 years ago

touchid v0.0.14

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

TouchID Plugin

This is a fingerprint plugin build for iOS version greater than 8. We will try to extend the functionality for android in later phase.

Note: -
1)Minimum iOS version is 8. It will return error callbacks on lower versions. 2)Requires a fingerprint scanner, so an iPhone 5S or newer is required.

Automatically (CLI):

From npm:

$ cordova plugin add cordova-plugin-touch-id
$ cordova prepare

From git: Still not hosted this project on github. We will do it later.

Manually

1. Add the following xml to your config.xml in the root directory of your www folder:

<feature name="touchid">
  <param name="ios-package" value="touchid" />
</feature>
You'll have to add the LocalAuthentication.framework and Security.framework to your project.

2. Copy touchid.js, add it to your project and reference it in index.html:

<script type="text/javascript" src="js/touchid.js"></script>
3. Download the source files and copy them to your project.

iOS: Copy the two .h and two .m files to platforms/ios/<ProjectName>/Plugins

Usage

This plugin contains 2 method

1) isAvailable :- This method will help to find if the device is having touch id support.

window.plugins.touchid.isAvailable(
  successCallBack,    // success handler: touchid available
  errorCallBack // error handler: no touchid available
);

2) verifyFingerprint :- This method should be called to verify finger print. The plugin fallback option called 'enter passcode' which shows the default passcode UI when pressed. First parameter is the title to the pop.

window.plugins.touchid.verifyFingerprint(
  'please Scan your fingerprint ', // this will be shown in the native scanner popup
   successCallBack, // success handler: fingerprint accepted
   errorCallBack// error handler with errorcode and localised reason
);

function successCallBack(msg) {
    alert('ok: ' + msg)
}

function errorCallBack(msg) {
    alert('not ok: ' + JSON.stringify(msg))
}
0.0.14

6 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.3.0

9 years ago