Reference
Device info API
The shared native and browser device result.
internalPlugins.device defaults to true. The native dependency is @capacitor/device, with the package's declared compatible version range ^8.0.3.
getDeviceInfo is an Effect of DeviceInfo requiring Bridge, with BridgeError failures. DeviceInfoSchema validates the common result.
| Field | Values |
|---|---|
platform | "android", "ios", or "web" |
model | String |
operatingSystem | "android", "ios", "windows", "mac", "linux", or "unknown" |
osVersion | String |
manufacturer | String |
isVirtual | Boolean |
| Browser field or API | Contract |
|---|---|
browserDeviceInfo({ userAgent, userAgentData? }) | Synchronous user-agent derivation |
platform | "web", unlike native context "browser" |
model, manufacturer | "unknown" |
isVirtual | false; user agents cannot reliably identify emulators |
osVersion | May be unknown with reduced user-agent information |
useDeviceInfo() returns DeviceInfoState with loading, value, and error fields. The effect starts after mount. Native failures use bridge error tags.
Platform support
| Capability | Android | iOS | Browser |
|---|---|---|---|
| Device result | Capacitor device info | Capacitor device info | Derived user-agent info |
Source: device info implementation.