Cordova Anti Tampering

#1

Has anyone implemented this plugin in their project?
I have implemented the plugin but and called this function:

window.cordova.plugins.AntiTampering.verify(
function (success) {
console.info(success);
// {“assets”: {“count”: x}} - where x is the number of assets checked
},
function (error) {
console.error(error);
// gives you the file on which tampering was detected
}
);

The problem is, the function goes in the success block but the count is 0, which means the plugin doesn’t actually scan any files. I want to know what’s wrong.

Mentioning the steps that I have followed:

Step One: Installation using cmd.
command was:
cordova plugin add cordova-plugin-antitampering --variable ENABLE_CORDOVA_CALLBACK=true --save

Step two: Invoke method in app.component.ts using this code:

declare var window: any

constructor(){
this.checkTampering();
}

checkTampering( ) {
alert(“Inside Check Tampering”);
try {
alert("Inside Try: ");
window.cordova.plugins.AntiTampering.verify(
function (success) {
alert(JSON.stringify(success));
// {“assets”: {“count”: x}} - where x is the number of assets checked
},
function (error) {
alert(JSON.stringify(error));
// gives you the file on which tampering was detected
}
);

} catch (e) {
  alert("Caught some exception when implementing Integrity check: " + JSON.stringify(e));
}

}

Step 3 : Run it on the device using command: ionic cordova run android