Storage
Persist identity and version state with MMKV or AsyncStorage.
The storage adapter persists the SDK's identity and version state across launches.
Pick one. Keys are namespaced as teardown:v1:{org}:{project}:{key}, so the adapter
can be shared with the rest of your app.
MMKV (recommended)
Fast, synchronous, and encrypted. Requires a custom dev build (not Expo Go).
npm install react-native-mmkvimport { MMKVStorageAdapter } from "@teardown/force-updates/adapters/mmkv";
new TeardownCore({
// ...
storageAdapter: new MMKVStorageAdapter(),
});AsyncStorage
Works everywhere, including Expo Go. Asynchronous under the hood with an in-memory cache for synchronous reads.
npx expo install @react-native-async-storage/async-storageimport { AsyncStorageAdapter } from "@teardown/force-updates/adapters/async-storage";
new TeardownCore({
// ...
storageAdapter: new AsyncStorageAdapter(),
});Use MMKV for production builds and AsyncStorage when you need Expo Go compatibility.