Adapters
Plug in storage, device, and notification implementations for your platform.
Adapters let the SDK talk to your platform's native modules. You always provide one storage adapter and one device adapter. A notification adapter is optional.
| Type | Required? | Options |
|---|---|---|
| Storage | Yes | MMKV, AsyncStorage |
| Device | Yes | Expo, react-native-device-info |
| Notifications | No | Expo, Firebase, Wix |
import { TeardownCore } from "@teardown/force-updates";
import { ExpoDeviceAdapter } from "@teardown/force-updates/expo";
import { MMKVStorageAdapter } from "@teardown/force-updates/adapters/mmkv";
export const teardown = new TeardownCore({
config: { type: "hosted", org_id: "your_org_id", project_id: "your_project_id", api_key: "your_api_key" },
storageAdapter: new MMKVStorageAdapter(), // required
deviceAdapter: new ExpoDeviceAdapter(), // required
// notificationAdapter: new ExpoNotificationsAdapter(), // optional
});Pick the adapters that match your project (Expo vs. bare React Native) and install only their native modules. Each adapter page has a copy-paste install + setup block.