capacitor-device
v0.0.1
Published
CapacitorDevice Capacitor Plugin
Readme
capacitor-device
CapacitorDevice Capacitor Plugin
Install
npm install capacitor-device
npx cap syncAPI
getInfo()
getInfo() => Promise<DeviceInfo>Get detailed device information
Returns: Promise<DeviceInfo>
Interfaces
DeviceInfo
| Prop | Type | Description |
| --------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- |
| arch | string | CPU architecture of the device Examples: 'arm64', 'armv7', 'x86_64', 'x86', 'unknown' |
| model | string | Device model name Examples: 'iPhone 14 Pro', 'Samsung Galaxy S23', 'iPad Pro' |
| platform | 'ios' | 'android' | 'web' | Device platform Examples: 'ios', 'android', 'web' |
| operatingSystem | string | Operating system Examples: 'iOS', 'Android' |
| osVersion | string | Operating system version Examples: '17.0', '14.0' |
| manufacturer | string | Device manufacturer Examples: 'Apple', 'Samsung', 'Google' |
| uuid | string | Device UUID |
| isVirtual | boolean | Whether the device is virtual (emulator/simulator) |
| name | string | User-defined device name |
| memFree | number | Free memory capacity (bytes) |
| memTotal | number | Total memory capacity (bytes) |
| diskFree | number | Free disk space (bytes) |
| diskTotal | number | Total disk capacity (bytes) |
