Platform differences
DeviceDetails fields
| Field | iOS | Android |
|---|---|---|
brand, manufacturer | Apple | Build.BRAND, Build.MANUFACTURER |
model | UIDevice.model (iPhone, iPad) | Build.MODEL (Pixel 9) |
modelName | Marketing name from a model table (iPhone 16 Pro), else model | Build.MODEL |
deviceId | Machine name (iPhone17,3), simulated one on a simulator | Build.DEVICE |
productName | absent | Build.PRODUCT |
deviceName | UIDevice.name: the generic model on iOS 16+ without the entitlement | Device name setting, else Build.MODEL |
deviceType | Interface idiom; desktop for iPhone and iPad apps on a Mac | UI mode, TV and PC features, smallest width of 600 dp |
deviceYearClass | Release year from the model table, absent for unknown models | Estimate from physical memory |
supportedAbis | The architecture the build runs as | Build.SUPPORTED_ABIS |
systemName, systemVersion | iOS or iPadOS, UIDevice.systemVersion | Android, Build.VERSION.RELEASE |
osBuildId | kern.osversion (24A335) | Build.DISPLAY |
osBuildFingerprint | absent | Build.FINGERPRINT |
apiLevel | absent | Build.VERSION.SDK_INT |
appName | CFBundleDisplayName, else CFBundleName | Application label |
bundleId | Bundle identifier | Application ID |
appVersion, buildNumber | CFBundleShortVersionString, CFBundleVersion | versionName, versionCode |
installerPackageName | absent | Installing package, absent when sideloaded |
isEmulator | Simulator build | Build fingerprint heuristic |
isRooted | Jailbreak file and sandbox heuristic, false on a simulator | su binaries and test-keys, false on an emulator |
hasNotch, hasDynamicIsland | From the model table | Display cutout on API 29+; hasDynamicIsland always false |
totalMemory | ProcessInfo.physicalMemory | ActivityManager.MemoryInfo.totalMem |
maxMemory | absent | Runtime.maxMemory |
Sizes are bytes. Fields marked absent are undefined on that platform; their TypeScript types are optional.
info
deviceName on iOS 16 and later returns the generic model (iPhone) unless the app has Apple's user-assigned device name entitlement.
Methods
| Method | iOS | Android |
|---|---|---|
getUsedMemory() | Memory footprint of the process | Proportional set size (Debug.MemoryInfo.totalPss) |
getFontScale() | Dynamic Type size relative to the default | Configuration.fontScale |
getVendorId() | identifierForVendor, shared by apps of the same vendor | ANDROID_ID, scoped to the app's signing key |
isHeadphonesConnected() | Wired, Bluetooth A2DP, HFP or LE output in the current audio route | Wired, USB, Bluetooth A2DP or SCO, or BLE (API 31+) output |
isPasscodeSet() | LAContext can evaluate device owner authentication | KeyguardManager.isDeviceSecure |
isLocationEnabled() | CLLocationManager.locationServicesEnabled(), off the main thread | Location services setting |
getUserAgent() | navigator.userAgent from a short-lived WKWebView, cached | WebSettings.getDefaultUserAgent, off the main thread |
getSystemFeatures() | Always empty | PackageManager.systemAvailableFeatures |
hasSystemFeature(name) | Always false | PackageManager.hasSystemFeature |
Simulators and emulators
| Value | iOS simulator | Android emulator |
|---|---|---|
isEmulator | true | true |
isRooted | false | false |
deviceId | The simulated device's machine name | Build.DEVICE |
batteryLevel | undefined | Emulated level |
batteryState | unknown | Emulated state |