Skip to main content

Requirements

Before installing expo-native-storage, ensure your project meets these requirements:
  • Expo SDK 53+ - This module requires Expo SDK version 53 or higher
  • Development builds - This module requires native code and will not work with Expo Go

Install the package

1

Install expo-native-storage

Add expo-native-storage to your project using your preferred package manager:
npx expo install expo-native-storage
This module requires native code and will not work with Expo Go. You must create a development build or production build to use expo-native-storage.
2

Prebuild your project

After installation, generate the native iOS and Android directories:
npx expo prebuild --clean
The --clean flag ensures a fresh build by removing existing native directories before generating new ones.
3

Run your app

Build and run your app on your target platform:
npx expo run:ios
This command compiles the native code and launches your app on a simulator/emulator or physical device.
4

Verify installation

Test that the module is properly linked by importing and using it:
import Storage from 'expo-native-storage';

// Try a simple operation
await Storage.setItem('test', 'value');
const result = await Storage.getItem('test');
console.log(result); // 'value'
If you see the value logged, expo-native-storage is successfully installed!

Platform-specific verification

If you encounter issues, verify the module is properly linked on each platform:

iOS

Check that ExpoNativeStorage appears in your ios/Podfile.lock:
grep -i "ExpoNativeStorage" ios/Podfile.lock

Android

Verify the module is included in your Android build by checking the gradle dependencies:
cd android && ./gradlew :app:dependencies | grep expo-native-storage

Troubleshooting

If you encounter the error “Cannot find native module ‘ExpoNativeStorage’”, see the Troubleshooting guide for solutions.

Next steps

Quickstart

Start using expo-native-storage in your app with a working example.

Build docs developers (and LLMs) love