Skip to main content


Get and set data in the iOS Keychain

Requires Cordova plugin: cordova-plugin-ios-keychain. For more info, please see the Keychain plugin docs.

See also Secure Storage for more supported platforms.

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.


$ npm install cordova-plugin-ios-keychain $ npm install @ionic-native/keychain $ ionic cap sync

Supported Platforms#

  • iOS



Learn more about using Ionic Native components in React


import { Keychain } from '@ionic-native/keychain/ngx';
constructor(private keychain: Keychain) { }
this.keychain.set(key, value).then(() => {  this.keychain.get(key)    .then(value => console.log('Got value', value))    .catch(err => console.error('Error getting', err));}).catch(err => console.error('Error setting', err));