I requires to add “Keychain” plugin in the project.
After I add the plugin with the following command, and add the sample code, there is an error that says Cannot find variable “Keychain”
Command: cordova plugin add https://github.com/shazron/KeychainPlugin.git
Sample code:
$cordovaKeychain.setForKey(key, serviceName, value).then(function(value) {
console.log(value);
}, function (err) {
console.error(err);
});
Error:
0 702526 error Error: Can’t find variable: Keychain
setForKey@http://10.70.153.147:8100/lib/ngCordova/dist/ng-cordova.js:4133:30
setKeychainValue@http://10.70.153.147:8100/js/keychain.js:7:30
Anyone has similar experience can advise?
Appreciate a lot!