ExpoDeviceAdapter
Device adapter for Expo projects using expo-device and expo-application.
The ExpoDeviceAdapter uses Expo's native modules to collect device information.
Installation
npx expo install expo-device expo-applicationUsage
import { TeardownCore } from '@teardown/force-updates';
import { ExpoDeviceAdapter } from '@teardown/force-updates/adapters/expo';
import { MMKVStorageAdapter } from '@teardown/force-updates/adapters/mmkv';
export const teardown = new TeardownCore({
org_id: 'your-org-id',
project_id: 'your-project-id',
api_key: 'your-api-key',
storageAdapter: new MMKVStorageAdapter(),
deviceAdapter: new ExpoDeviceAdapter(),
});Import Path
import { ExpoDeviceAdapter } from '@teardown/force-updates/adapters/expo';Collected Data
Application Info
version- Fromexpo-applicationnativeApplicationVersionbuild_number- Fromexpo-applicationnativeBuildVersion(as number)
Hardware Info
device_name- Fromexpo-devicedeviceNamedevice_brand- Fromexpo-devicebranddevice_type- Fromexpo-devicedeviceType(phone, tablet, desktop, tv, unknown)
OS Info
platform- Mapped from React NativePlatform.OStoDevicePlatformEnumname- Fromexpo-deviceosNameversion- Fromexpo-deviceosVersion
When to Use
- Expo managed workflow projects
- Expo bare workflow projects using Expo modules
- Projects using Expo SDK 50+
Requirements
expo-device>= 8.0.0expo-application>= 7.0.0