Introduction
react-native-nitro-device-info reads device information from Swift and Kotlin through Nitro Modules. It provides synchronous properties, synchronous methods, Promise-based methods, and React hooks.
Start with your task
Choose an API entry point
The package has two API entry points. Their names and return types differ.
The compatibility layer targets react-native-device-info 15.x. Review its placeholder values and behavior differences before migrating.
Platforms and return values
- iOS: The library's deployment target is 15.1+.
- Android: The library's minimum SDK is API 24 (Android 7.0).
- Web: A JavaScript fallback provides browser-derived values where available. Other APIs return placeholders; see Web Support.
Your React Native and Nitro versions can impose higher platform requirements. Synchronous calls return directly and run on the calling thread. They do not guarantee a particular execution time.
Unsupported or unavailable values can be "unknown", -1, false, or an empty collection. Check each API's contract before using a result.
Device information and security
Local integrity checks detect root or jailbreak indicators. They are bypassable and do not prove that a device is trustworthy.
For tokens that your backend verifies, use the separate, optional react-native-nitro-device-integrity package.
For the architecture and measurement guidance, read Why Nitro Module.
