Skip to content

j5int/cordova-plugin-clear-data

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-clear-data Latest Stable Version Total Downloads

Cordova plugin to clear locally persistent user data on Android and iOS.

Installation

$ cordova plugin add cordova-plugin-clear-data

Usage

The plugin is exposed via the ClearData global namespace.

cache()

Platforms: Android and iOS

Clears the web resources cache of the application (in-memory and on-disk).

ClearData.cache(success, error);

Parameters

  • {function} success - (optional) function to execute on successfully clearing app cache.
  • {function} error - (optional) function to execute on failure to clear app cache. Will be passed a single argument which is the error message string.

Simple usage

ClearData.cache();

Advanced usage

ClearData.cache(function() {
    console.info('Successfully cleared app cache');
}, function(err) {
    console.error('Error clearing app cache', err);
});

About

Cordova plugin to clear locally persistent user data on Android and iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 57.1%
  • Java 36.2%
  • JavaScript 6.7%