nativescript-safetynet-helper
by chimon2000 | v0.1.1
A NativeScript plugin to use the SafetyNet API
npm i --save nativescript-safetynet-helper

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