Skip to main content
Version: 5.x

getItem

Get an item from storage

getItem(key, options) : Promise<string>

Example:

import RNSInfo from 'react-native-sensitive-info';
const myFunc = async () => {    return SInfo.getItem('key1', {        sharedPreferencesName: 'mySharedPrefs',        keychainService: 'myKeychain'    });}
await myFunc();
// The data is retrieved