Skip to main content

Device details

getDeviceDetails() returns a DeviceDetails object. The native side builds it once, on the first call, and returns the cached value after that. This page covers the fields that are derived rather than read straight from an OS property.

Model name​

PlatformmodelmodelName
iOSUIDevice.model (iPhone)Marketing name from a table of known models (iPhone 16 Pro)
AndroidBuild.MODEL (Pixel 9)Build.MODEL

The iOS table covers the iPhone and iPad models that run iOS 16, the package's minimum, up to the iPhone 17 family and the iPad Pro (M5). A model released after the installed version of the package is not in the table: modelName falls back to model, and deviceYearClass is absent.

deviceId is the hardware identifier: the machine name on iOS (iPhone17,3, the simulated device's on a simulator), Build.DEVICE on Android.

Device type​

ValueiOSAndroid
phonePhone interface idiomEverything not matched below
tabletPad interface idiomSmallest screen width of 600 dp or more
tvTV interface idiomTelevision UI mode, or the leanback feature
desktopAn iPhone or iPad app running on a MacDesk UI mode, the PC feature (API 27+), or ChromeOS
unknownOther idioms, such as Apple Vision ProWatch UI mode

Year class​

deviceYearClass is the year a flagship with similar performance was released, for scaling features to the hardware.

  • iOS: the model's release year from the same table as modelName. Absent for models the table does not know.
  • Android: an estimate from physical memory, extending Facebook's year-class RAM table:
Physical memoryYear
≤ 768 MB2010
≤ 1 GB2011
≤ 1.5 GB2012
≤ 2 GB2013
≤ 3 GB2014
≤ 4 GB2016
≤ 6 GB2018
≤ 8 GB2020
≤ 12 GB2022
more2024

Notch and Dynamic Island​

  • iOS: both come from the model table. A Dynamic Island does not count as a notch, so an iPhone 15 reports hasNotch: false, hasDynamicIsland: true.
  • Android: hasNotch is whether the display reports a cutout, on API 29 and later; false before. hasDynamicIsland is always false.

Emulator and root flags​

warning

isRooted is a heuristic that a determined user can defeat. Do not use it as a security boundary.

FlagiOSAndroid
isEmulatorCompiled for the simulatorBuild fingerprint, hardware (goldfish, ranchu), model or product names that emulators use
isRootedJailbreak files (Cydia, Sileo, /var/jb, ...) or write access outside the sandboxtest-keys build tags or su and Magisk paths

isRooted is always false on the iOS simulator and on Android emulators, whose images look rooted.

Memory​

totalMemory is the device's physical memory in bytes. On Android, maxMemory adds the Java heap limit (Runtime.maxMemory); it is absent on iOS. For the memory the app uses right now, call getUsedMemory().