Skip to content

gimalon/cordova-prefs-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Preferences plugin v 1.0.0

This is a modified version to Alex Portnoy's version. Changes are:

  • Original plugin did not return JSON
  • Original version got stuck in a Mutex Wait on IOS when storing a NULL value

This plugin enables your app to store small pieces of data like app settings and preferences in device's persistent storage in a key-value manner. On iOS plugin uses NSUserDefaults, on Android - SharedPreferences features. All values are stored as a JSON strings on save and converted back to their respective types upon loading.

Usage

Plugin becomes available after DeviceReady event is fired.

To store a key-value pair call:

Preferences.put(myKey, myAwesomeValue);

Preferences.put(myKey, myAwesomeValue, success, fail);

To load a value for a key call:

Preferences.get(myKey, function(value) {}, error);

INSTALLATION

cordova plugin add https://github.com/alexportnoy/cordova-prefs-plugin

SUPPORTED PLATFORMS

  • iOS
  • Android

CHANGELOG

v1.0.0:

  • First version of plugin

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published