---
description: Discover alternatives to the discontinued Ionic Secure Storage plugin with Capacitor SQLite and Secure Preferences for secure data storage.
title: Alternative to the Ionic Secure Storage Plugin - Capawesome
image: https://capawesome.io/docs/assets/images/social/blog/alternative-to-ionic-secure-storage-plugin.png
---

[ Skip to content](#alternative-to-the-ionic-secure-storage-plugin) 

[ 🔐 Introducing the **Capacitor Vault** plugin — store secrets behind biometrics or a device passcode.](/blog/announcing-the-capacitor-vault-plugin/) 

* [  SDKs ](/docs/sdks/)
* [  Formbricks ](/docs/sdks/capacitor/formbricks/)
* [  Geocoder ](/docs/sdks/capacitor/geocoder/)
* [  Google Sign-In ](/docs/sdks/capacitor/google-sign-in/)
* [  Grafana Faro ](/docs/sdks/capacitor/grafana-faro/)
* [  libSQL ](/docs/sdks/capacitor/libsql/)
* [  Live Update ](/docs/sdks/capacitor/live-update/)
* [  Managed Configurations ](/docs/sdks/capacitor/managed-configurations/)
* [  Media Session ](/docs/sdks/capacitor/media-session/)
* [  ML Kit ](/docs/sdks/capacitor/mlkit/)
* [  Navigation Bar ](/docs/sdks/capacitor/navigation-bar/)
* [  NFC ](/docs/sdks/capacitor/nfc/)
* [  OAuth ](/docs/sdks/capacitor/oauth/)
* [  Pedometer ](/docs/sdks/capacitor/pedometer/)
* [  Photo Editor ](/docs/sdks/capacitor/photo-editor/)
* [  PostHog ](/docs/sdks/capacitor/posthog/)
* [  Printer ](/docs/sdks/capacitor/printer/)
* [  Purchases ](/docs/sdks/capacitor/purchases/)
* [  RealtimeKit ](/docs/sdks/capacitor/realtimekit/)
* [  Screen Orientation ](/docs/sdks/capacitor/screen-orientation/)
* [  Screenshot ](/docs/sdks/capacitor/screenshot/)
* [  Secure Preferences ](/docs/sdks/capacitor/secure-preferences/)
* [  Speech Recognition ](/docs/sdks/capacitor/speech-recognition/)
* [  Speech Synthesis ](/docs/sdks/capacitor/speech-synthesis/)
* [  Share Target ](/docs/sdks/capacitor/share-target/)
* [  Square Mobile Payments ](/docs/sdks/capacitor/square-mobile-payments/)
* [  SQLite ](/docs/sdks/capacitor/sqlite/)
* [  Superwall ](/docs/sdks/capacitor/superwall/)
* [  Torch ](/docs/sdks/capacitor/torch/)
* [  Vault ](/docs/sdks/capacitor/vault/)
* [  Wifi ](/docs/sdks/capacitor/wifi/)
* [  Zip ](/docs/sdks/capacitor/zip/)
* [  Cordova ](/docs/sdks/cordova/)
* [  Cloud ](/docs/cloud/)
* [  Integrations ](/docs/cloud/live-updates/integrations/)
* Concepts
* Reference
* [  Troubleshooting ](/docs/cloud/live-updates/troubleshooting/)
* [  FAQ ](/docs/cloud/live-updates/faq/)
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Set Up Environments ](/docs/cloud/native-builds/environments/)
* [  Overwrite Native Configurations ](/docs/cloud/native-builds/native-configurations/)
* [  Auto-Increment Build Numbers ](/docs/cloud/native-builds/auto-incrementing-build-numbers/)
* [  Configure the Web Build Script ](/docs/cloud/native-builds/web-build-script/)
* [  Build from a Monorepo ](/docs/cloud/native-builds/monorepo/)
* [  Use pnpm or Yarn ](/docs/cloud/native-builds/package-managers/)
* [  Install Private npm Packages ](/docs/cloud/native-builds/npm-private-registry/)
* [  Override the Java Version ](/docs/cloud/native-builds/override-java-version/)
* [  Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/custom-ios-provisioning-profiles/)
* [  Build without Git ](/docs/cloud/native-builds/build-without-git/)
* [  Access Git Behind a Firewall ](/docs/cloud/native-builds/firewall-access/)
* [  Integrations ](/docs/cloud/native-builds/integrations/)
* Reference
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  FAQ ](/docs/cloud/native-builds/faq/)
* [  App Store Publishing ](/docs/cloud/app-store-publishing/)
* [  Submit a Build ](/docs/cloud/app-store-publishing/submit-a-build/)
* [  Submit Automatically After a Build ](/docs/cloud/app-store-publishing/submit-automatically/)
* [  Troubleshooting ](/docs/cloud/app-store-publishing/troubleshooting/)
* [  FAQ ](/docs/cloud/app-store-publishing/faq/)
* [  Automations ](/docs/cloud/automations/)
* [  Reference ](/docs/cloud/automations/reference/)
* [  Troubleshooting ](/docs/cloud/automations/troubleshooting/)
* [  FAQ ](/docs/cloud/automations/faq/)
* [  Assist ](/docs/cloud/assist/)
* [  CLI ](/docs/cloud/cli/)
* APIs and SDKs
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Integrations ](/docs/cloud/integrations/)
* Account
* [  Organization ](/docs/cloud/organizations/)
* [  Two-Factor Enforcement ](/docs/cloud/organizations/two-factor-authentication/)
* [  Audit Logs ](/docs/cloud/organizations/audit-logs/)
* [  Billing ](/docs/cloud/organizations/billing/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  AI ](/docs/ai/)
* [  Insiders ](/docs/insiders/)
* [  Billing & Plans ](/docs/insiders/billing-and-plans/)
* [  FAQ ](/docs/insiders/faq/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/support/)
* [  Contributing ](/docs/contributing/)
* Contributing code
* [  Code of Conduct ](/docs/contributing/code-of-conduct/)
* [  Questions ](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#creating-a-discussion)
* [  Blog ](/blog/)
* Categories

* [  SQLite ](#sqlite)
* [  Need Help Migrating? ](#need-help-migrating)
* [  Conclusion ](#conclusion)

* Related links

# Alternative to the Ionic Secure Storage Plugin[¶](#alternative-to-the-ionic-secure-storage-plugin "Permanent link")

Looking for a secure storage solution for your Capacitor app? With [Ionic discontinuing](https://ionic.io/blog/important-announcement-the-future-of-ionics-commercial-products) their commercial Secure Storage plugin, developers need reliable alternatives for encrypted data storage. The [Capacitor SQLite](/docs/sdks/capacitor/sqlite/) plugin and [Capacitor Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin provide modern, secure solutions that address the functionality gap left by Ionic Secure Storage.

[ ![Build and deploy your Capacitor app with Capawesome Cloud](https://capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1) ](https://capawesome.io/) 

## Key Takeaways[¶](#key-takeaways "Permanent link")

* Ionic Secure Storage is being discontinued following Ionic's acquisition by OutSystems.
* For key-value data, migrate to the [Capacitor Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin, which uses the Android Keystore and iOS Keychain.
* For encrypted databases, migrate to the [Capacitor SQLite](/docs/sdks/capacitor/sqlite/) plugin, which offers 256-bit AES encryption via SQLCipher.
* Both plugins are actively maintained and stay current with the latest Capacitor versions.
* The Capawesome team offers a dedicated migration service if you'd rather not handle it yourself.

## Why migrate from Ionic Secure Storage?[¶](#why-migrate-from-ionic-secure-storage "Permanent link")

Ionic Secure Storage has been a go-to solution for developers requiring encrypted local storage in their Capacitor applications. However, following Ionic's acquisition by OutSystems and their announcement to phase out commercial products, developers must find alternative solutions for secure data storage. The plugin offered both key-value storage and SQLite database functionality with 256-bit AES encryption, making it essential for applications handling sensitive data.

The [Capacitor SQLite](/docs/sdks/capacitor/sqlite/) plugin and [Capacitor Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin cover both use cases. The SQLite plugin encrypts databases with 256-bit AES via SQLCipher, while Secure Preferences stores key-value data using the Android Keystore and iOS Keychain — matching the security model developers relied on with Ionic Secure Storage.

AI-Assisted Migration

For a more guided experience, add the [Capawesome skills](https://github.com/capawesome-team/skills) to your project with `npx skills add capawesome-team/skills --skill ionic-enterprise-sdk-migration` and use the following prompt with your preferred AI coding assistant:

`` [](#%5F%5Fcodelineno-0-1)Use the `ionic-enterprise-sdk-migration` skill from `capawesome-team/skills` to help me migrate from Ionic Secure Storage to Capawesome alternatives.
 ``

## Migration from Ionic Secure Storage[¶](#migration-from-ionic-secure-storage "Permanent link")

Migrating from Ionic Secure Storage requires choosing the appropriate replacement based on your storage needs: key-value storage or SQLite database functionality.

### Key-Value Store[¶](#key-value-store "Permanent link")

For applications using Ionic Secure Storage's key-value functionality, migrate to the [Capacitor Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin.

#### Installation[¶](#installation "Permanent link")

Begin by removing the existing Ionic Secure Storage dependency and installing the Capawesome alternative, if you haven't already. To install the [Capacitor Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin, please refer to the [Installation](/docs/sdks/capacitor/secure-preferences/#installation) section in the plugin documentation.

#### Create a store[¶](#create-a-store "Permanent link")

Unlike Ionic Secure Storage, the Capacitor Secure Preferences plugin doesn't require explicit store creation. The secure storage is automatically available after installation. Values are encrypted using the Android Keystore and stored in the iOS Keychain, so the plugin handles key management for you.

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-1-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-1-2)
[](#%5F%5Fcodelineno-1-3)const createStore = async () => {
[](#%5F%5Fcodelineno-1-4)  await KeyValueStorage.create('my-secret-key');
[](#%5F%5Fcodelineno-1-5)};
`

**Capacitor Secure Preferences:**

`[](#%5F%5Fcodelineno-2-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-2-2)
[](#%5F%5Fcodelineno-2-3)// No store creation needed - ready to use immediately
`

#### Set a value[¶](#set-a-value "Permanent link")

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-3-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-3-2)
[](#%5F%5Fcodelineno-3-3)const setValue = async () => {
[](#%5F%5Fcodelineno-3-4)  await KeyValueStorage.set('username', 'john_doe');
[](#%5F%5Fcodelineno-3-5)};
`

**Capacitor Secure Preferences:**

`[](#%5F%5Fcodelineno-4-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-4-2)
[](#%5F%5Fcodelineno-4-3)const setValue = async () => {
[](#%5F%5Fcodelineno-4-4)  await SecurePreferences.set({
[](#%5F%5Fcodelineno-4-5)    key: 'username',
[](#%5F%5Fcodelineno-4-6)    value: 'john_doe'
[](#%5F%5Fcodelineno-4-7)  });
[](#%5F%5Fcodelineno-4-8)};
`

#### Get a value[¶](#get-a-value "Permanent link")

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-5-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-5-2)
[](#%5F%5Fcodelineno-5-3)const getValue = async () => {
[](#%5F%5Fcodelineno-5-4)  const value = await KeyValueStorage.get('username');
[](#%5F%5Fcodelineno-5-5)  return value;
[](#%5F%5Fcodelineno-5-6)};
`

**Capacitor Secure Preferences:**

`[](#%5F%5Fcodelineno-6-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-6-2)
[](#%5F%5Fcodelineno-6-3)const getValue = async () => {
[](#%5F%5Fcodelineno-6-4)  const { value } = await SecurePreferences.get({ key: 'username' });
[](#%5F%5Fcodelineno-6-5)  return value;
[](#%5F%5Fcodelineno-6-6)};
`

#### Remove a value[¶](#remove-a-value "Permanent link")

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-7-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-7-2)
[](#%5F%5Fcodelineno-7-3)const removeValue = async () => {
[](#%5F%5Fcodelineno-7-4)  await KeyValueStorage.remove('username');
[](#%5F%5Fcodelineno-7-5)};
`

**Capacitor Secure Preferences:**

`[](#%5F%5Fcodelineno-8-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-8-2)
[](#%5F%5Fcodelineno-8-3)const removeValue = async () => {
[](#%5F%5Fcodelineno-8-4)  await SecurePreferences.remove({ key: 'username' });
[](#%5F%5Fcodelineno-8-5)};
`

#### Clear the store[¶](#clear-the-store "Permanent link")

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-9-1)import { KeyValueStorage } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-9-2)
[](#%5F%5Fcodelineno-9-3)const clearStore = async () => {
[](#%5F%5Fcodelineno-9-4)  await KeyValueStorage.clear();
[](#%5F%5Fcodelineno-9-5)};
`

**Capacitor Secure Preferences:**

`[](#%5F%5Fcodelineno-10-1)import { SecurePreferences } from '@capawesome-team/capacitor-secure-preferences';
[](#%5F%5Fcodelineno-10-2)
[](#%5F%5Fcodelineno-10-3)const clearStore = async () => {
[](#%5F%5Fcodelineno-10-4)  await SecurePreferences.clear();
[](#%5F%5Fcodelineno-10-5)};
`

### SQLite[¶](#sqlite "Permanent link")

For applications using Ionic Secure Storage's SQLite functionality, migrate to the [Capacitor SQLite](/docs/sdks/capacitor/sqlite/) plugin.

#### Installation[¶](#installation%5F1 "Permanent link")

Begin by removing the existing Ionic Secure Storage dependency and installing the Capawesome alternative, if you haven't already. To install the [Capacitor SQLite](/docs/sdks/capacitor/sqlite/) plugin, please refer to the [Installation](/docs/sdks/capacitor/sqlite/#installation) section in the plugin documentation.

#### Opening a database[¶](#opening-a-database "Permanent link")

Database initialization differs between the two solutions. Here's how to adapt your database setup:

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-11-1)import { SQLite } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-11-2)
[](#%5F%5Fcodelineno-11-3)const openDatabase = async () => {
[](#%5F%5Fcodelineno-11-4)  const db = await SQLite.create({
[](#%5F%5Fcodelineno-11-5)    name: 'database.db',
[](#%5F%5Fcodelineno-11-6)    location: 'default',
[](#%5F%5Fcodelineno-11-7)  });
[](#%5F%5Fcodelineno-11-8)  await db.executeSql('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)', []);
[](#%5F%5Fcodelineno-11-9)  return db;
[](#%5F%5Fcodelineno-11-10)};
`

The Capacitor SQLite plugin encrypts databases with 256-bit AES via SQLCipher. Pass an `encryptionKey` to `open(...)` to keep the same encryption guarantee Ionic Secure Storage provided:

`[](#%5F%5Fcodelineno-12-1)import { Sqlite } from '@capawesome-team/capacitor-sqlite';
[](#%5F%5Fcodelineno-12-2)
[](#%5F%5Fcodelineno-12-3)const openDatabase = async () => {
[](#%5F%5Fcodelineno-12-4)  const { databaseId } = await Sqlite.open({
[](#%5F%5Fcodelineno-12-5)    path: 'database.db',
[](#%5F%5Fcodelineno-12-6)    encryptionKey: 'your-secret-key',
[](#%5F%5Fcodelineno-12-7)    upgradeStatements: [
[](#%5F%5Fcodelineno-12-8)      {
[](#%5F%5Fcodelineno-12-9)        version: 1,
[](#%5F%5Fcodelineno-12-10)        statements: [
[](#%5F%5Fcodelineno-12-11)          'CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)'
[](#%5F%5Fcodelineno-12-12)        ]
[](#%5F%5Fcodelineno-12-13)      }
[](#%5F%5Fcodelineno-12-14)    ]
[](#%5F%5Fcodelineno-12-15)  });
[](#%5F%5Fcodelineno-12-16)  return databaseId;
[](#%5F%5Fcodelineno-12-17)};
`

Enabling encryption

Encryption requires bundling SQLCipher in your native projects. See the [Encryption](/docs/sdks/capacitor/sqlite/#encryption) section in the plugin documentation for the platform setup. Don't hard-code the key — store it with the [Capacitor Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin.

#### Executing SQL statements[¶](#executing-sql-statements "Permanent link")

SQL execution patterns are streamlined in the Capacitor SQLite plugin:

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-13-1)import { SQLiteObject } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-13-2)
[](#%5F%5Fcodelineno-13-3)const insertUser = async (db: SQLiteObject, name: string, email: string) => {
[](#%5F%5Fcodelineno-13-4)  await db.executeSql(
[](#%5F%5Fcodelineno-13-5)    'INSERT INTO users (name, email) VALUES (?, ?)',
[](#%5F%5Fcodelineno-13-6)    [name, email]
[](#%5F%5Fcodelineno-13-7)  );
[](#%5F%5Fcodelineno-13-8)};
`

**Capacitor SQLite:**

`[](#%5F%5Fcodelineno-14-1)import { Sqlite } from '@capawesome-team/capacitor-sqlite';
[](#%5F%5Fcodelineno-14-2)
[](#%5F%5Fcodelineno-14-3)const insertUser = async (databaseId: string, name: string, email: string) => {
[](#%5F%5Fcodelineno-14-4)  await Sqlite.execute({
[](#%5F%5Fcodelineno-14-5)    databaseId,
[](#%5F%5Fcodelineno-14-6)    statement: 'INSERT INTO users (name, email) VALUES (?, ?)',
[](#%5F%5Fcodelineno-14-7)    values: [name, email]
[](#%5F%5Fcodelineno-14-8)  });
[](#%5F%5Fcodelineno-14-9)};
`

#### Querying data[¶](#querying-data "Permanent link")

Data retrieval follows similar simplification patterns:

**Ionic Secure Storage:**

`[](#%5F%5Fcodelineno-15-1)import { SQLiteObject } from '@ionic-enterprise/secure-storage';
[](#%5F%5Fcodelineno-15-2)
[](#%5F%5Fcodelineno-15-3)const getUsers = async (db: SQLiteObject) => {
[](#%5F%5Fcodelineno-15-4)  return new Promise((resolve) => {
[](#%5F%5Fcodelineno-15-5)    db.transaction(tx => {
[](#%5F%5Fcodelineno-15-6)      tx.executeSql('SELECT * FROM users WHERE name LIKE ?', ['%John%'], (tx, result) => {
[](#%5F%5Fcodelineno-15-7)        resolve(result.rows);
[](#%5F%5Fcodelineno-15-8)      });
[](#%5F%5Fcodelineno-15-9)    });
[](#%5F%5Fcodelineno-15-10)  });
[](#%5F%5Fcodelineno-15-11)};
`

**Capacitor SQLite:**

`[](#%5F%5Fcodelineno-16-1)import { Sqlite } from '@capawesome-team/capacitor-sqlite';
[](#%5F%5Fcodelineno-16-2)
[](#%5F%5Fcodelineno-16-3)const getUsers = async (databaseId: string) => {
[](#%5F%5Fcodelineno-16-4)  const result = await Sqlite.query({
[](#%5F%5Fcodelineno-16-5)    databaseId,
[](#%5F%5Fcodelineno-16-6)    statement: 'SELECT * FROM users WHERE name LIKE ?',
[](#%5F%5Fcodelineno-16-7)    values: ['%John%']
[](#%5F%5Fcodelineno-16-8)  });
[](#%5F%5Fcodelineno-16-9)  return result.values;
[](#%5F%5Fcodelineno-16-10)};
`

## Need Help Migrating?[¶](#need-help-migrating "Permanent link")

If you'd rather not handle the migration yourself, the Capawesome team can take care of it for you. Whether you're dealing with a straightforward key-value store swap or a more complex SQLite setup, we offer dedicated migration services to get you up and running with minimal downtime and effort on your end.

[Book a Free Consultation](https://cal.com/team/capawesome/ionic-appflow-migration)

## Conclusion[¶](#conclusion "Permanent link")

The discontinuation of Ionic Secure Storage doesn't have to disrupt your development workflow. The [Capacitor SQLite](/docs/sdks/capacitor/sqlite/) plugin and [Capacitor Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugin replace both the encrypted SQLite database and the key-value store, with 256-bit AES encryption, active maintenance for the latest Capacitor versions, and dedicated support from the Capawesome team.

By migrating to these Capawesome plugins, you gain access to actively maintained solutions that stay current with the latest Capacitor versions and platform updates, ensuring your applications remain secure and performant.

**Related reading:**

* [Alternatives to Ionic Enterprise Plugins](/blog/alternatives-to-ionic-enterprise-plugins/)
* [How to Securely Store Credentials with Capacitor](/blog/how-to-securely-store-credentials-with-capacitor/)

Have questions about your migration? Join the [Capawesome Discord server](https://discord.gg/VCXxSVjefW) to connect with the community, and subscribe to the [Capawesome newsletter](/newsletter/) to stay updated on the latest news about Capawesome, Capacitor, and the Ionic ecosystem.

If you need assistance with migrating from Ionic Secure Storage or implementing the [Capacitor SQLite](/docs/sdks/capacitor/sqlite/) or [Capacitor Secure Preferences](/docs/sdks/capacitor/secure-preferences/) plugins, the Capawesome team is available to help you transition smoothly to this reliable alternative. Just [contact us](mailto:support@capawesome.io) to get started.

June 10, 2026 

 Back to top 