NSUsersDefaults Wrapper Plugin for iOS
Author: Giulio Caruso aka rdn
Use the Cordova CLI and type in the following command:
cordova plugin add https://github.com/rdn87/cordova-plugin-gcnsusersdefaults
With this plug-in you can share some variables/settings between your native code and javascript code, you can save your variables in NSUserDefaults STANDARD.
The Plugin is only iOS Platform.
var data = {
key: "myKey",
value: "myValue"
};
GCNSUsersDefaults.saveStringByKey(function() {
// success function
}, function() {
// failed function
}, data);
var data = {
key: "myKey"
};
GCNSUsersDefaults.getStringByKey(function() {
// success function
}, function() {
// failed function
}, data);