BasicAdapter
Fallback device adapter with minimal or static device information.
The BasicAdapter provides minimal device information without external dependencies. Useful for testing or fallback scenarios.
Usage
import { TeardownCore } from '@teardown/force-updates';
import { BasicAdapter } from '@teardown/force-updates/adapters/basic';
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 BasicAdapter(),
});Import Path
import { BasicAdapter } from '@teardown/force-updates/adapters/basic';Collected Data
The BasicAdapter returns static or minimal information:
Application Info
version- Static value or from app.jsonbuild_number- Static value (as number)
Hardware Info
device_name- "Unknown Device"device_brand- "Unknown"device_type- "unknown"
OS Info
platform- From React NativePlatform.OSmapped toDevicePlatformEnumname- From React Native Platform APIversion- From React Native Platform API
When to Use
- Unit testing without native modules
- Development/prototyping
- Fallback when other adapters fail
- Environments where native modules aren't available
Limitations
- Limited device information accuracy
- No hardware-specific details
- Not recommended for production analytics