@ionic-native/native-storage

  • Version 5.36.0
  • Published
  • 18 kB
  • 1 dependency
  • MIT license

Install

npm i @ionic-native/native-storage
yarn add @ionic-native/native-storage
pnpm add @ionic-native/native-storage

Overview

Ionic Native - Native plugins for ionic apps

Index

Variables

variable NativeStorage

const NativeStorage: NativeStorageOriginal;

    Classes

    class NativeStorageOriginal

    class NativeStorageOriginal extends IonicNativePlugin {}
    • Native Storage nativestorage Native storage of variables in Android and iOS

      import { NativeStorage } from '@ionic-native/native-storage/ngx';
      constructor(private nativeStorage: NativeStorage) { }
      ...
      this.nativeStorage.setItem('myitem', {property: 'value', anotherProperty: 'anotherValue'})
      .then(
      () => console.log('Stored item!'),
      error => console.error('Error storing item', error)
      );
      this.nativeStorage.getItem('myitem')
      .then(
      data => console.log(data),
      error => console.error(error)
      );

    method clear

    clear: () => Promise<any>;
    • Removes all stored values.

      Returns

      {Promise}

    method getItem

    getItem: (reference: string) => Promise<any>;
    • Gets a stored item

      Parameter reference

      Returns

      {Promise}

    method initWithSuiteName

    initWithSuiteName: (reference: string) => Promise<void>;
    • Initialises shared storage with the suite name when using app groups in iOS

      Parameter reference

      Returns

      {Promise}

    method keys

    keys: () => Promise<any>;
    • Retrieving all keys

      Returns

      {Promise}

    method remove

    remove: (reference: string) => Promise<any>;
    • Removes a single stored item

      Parameter reference

      Returns

      {Promise}

    method setItem

    setItem: (reference: string, value: any) => Promise<any>;
    • Stores a value

      Parameter reference

      Parameter value

      Returns

      {Promise}

    Package Files (1)

    Dependencies (1)

    Dev Dependencies (0)

    No dev dependencies.

    Peer Dependencies (2)

    Badge

    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ionic-native/native-storage.

    • Markdown
      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@ionic-native/native-storage)
    • HTML
      <a href="https://www.jsdocs.io/package/@ionic-native/native-storage"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>