npm i --save nativescript-safetynet-helper
- Version: 0.1.1
- GitHub: https://github.com/chimon2000/nativescript-safetynet-helper
- NPM: https://www.npmjs.com/package/nativescript-safetynet-helper
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
NativeScript SafetyNet Helper
A NativeScript module for checking device integrity using the SafetyNet API. It uses the SafetyNet Helper library
Installation
From the command prompt go to your app's root folder and execute:
tns plugin add nativescript-safetynet-helper
Usage
Here are the supported functions:
function: requestTest
JavaScript
let SafetyNetHelper = require('nativescript-safetynet-helper').SafetyNetHelper
let helper = new SafetyNetHelper(this._apiKey)
helper.requestTest((err, result) => {
if (err) {
console.log(err)
this.updateMessage(err);
return
}
console.log(`Basic Integrity - ${result.basicIntegrity}, CTS Profile Match - ${result.ctsProfileMatch}`)
});
TypeScript
import { SafetyNetHelper } from 'nativescript-safetynet-helper';
let helper = new SafetyNetHelper(this._apiKey)
helper.requestTest((err, result) => {
if (err) {
console.log(err)
this.updateMessage(err);
return
}
console.log(`Basic Integrity - ${result.basicIntegrity}, CTS Profile Match - ${result.ctsProfileMatch}`)
});
Thanks
Scott Alexander-Bown for his contributions to SafetyNet Helper