react-native-touch-id-value

1.0.3 • Public • Published

react-native-touch-id-value

Saving and retrieving Apple TouchID protected values. Useful for storing essential authentication information.

Usage (iOS)

Install npm package:

npm install react-native-touch-id-value --save

Add links to the library:

react-native link react-native-touch-id-value

Make sure RNTouchIDValue.xcodeproj appeared in "Libraries" in your application XCode project and that libRNTouchIDValue.a is present in "Project properties" - "Targets" - "" - "Build Phases" - "Link Binary With Libraries".

Example

import { observable, action } from 'mobx';
import TouchID from 'react-native-touch-id-value';
 
const touchid = observable({
    available: false,
 
    @action async load() {
        this.available = await TouchID.isFeatureAvailable();
    },
 
    @action save(key, value) {
        return TouchID.save(value, key);
    },
 
    @action get(key) {
        return TouchID.get(key);
    }
});
 
export default touchid;
 
TouchID.isFeatureAvailable()
    .then(result => {
        console.log(`touchid-bridge.js: ${result}`);
    });

Package Sidebar

Install

npm i react-native-touch-id-value

Weekly Downloads

1

Version

1.0.3

License

ISC

Last publish

Collaborators

  • seavan