This plugin provides an encrypted data storage function. If the application is uninstalled, saved data will also be deleted.
Cordova 7.1 or later
iOS 9 or later
Android 4.1 or later
From Monaca Cloud IDE menu, go to
Configure → Cordova Plugin Settings.
Under Available Plugins section, hover over the
SecureStorage plugin and click
Save data into the storage by specifying the
Retrieve data associated with the specified key. The callback will return the intended data if the key is found; otherwise, a null value will be return.
Delete the data associated with a specified key. The boolean callback will notify whether the data deletion is successful (
Delete All Data
Delete all data in the storage. The boolean callback will notify whether the data deletion is successful (
In this plugin, we use the encryption library of iOS SDK. Therefore, in order to release the built app embedded this plugin to the App Store, you need to set 2 options when you submit your app for a review. Under the Export Compliance section, please choose "Yes" for both questions as shown in the screenshot below:
Change the storage method of encrypted data. This change can enhance security. Data saved by the Secure Storage Plugin can only be read by the saved device. If the application is launched on another terminal, eg, backed up The data saved by this plugin is different from the saved terminal and can not be read.
Security is enhanced as the
individual mode by adding the following settings to config.xml.
<preference name="SecureStorageMode" value="individual" />
Data saved with version 1.x is automatically migrated to the specified mode. As an example, if data saved in version 1.x is processed in version 2.x (static mode), data handled in version 1.x will be migrated in static mode.
Please note that if you change the mode from
Individual while using version 2.x, data can not be acquired.