react-native-device-info is a comprehensive library for React Native applications that provides access to various device-specific information across iOS, Android, and Windows platforms. It allows developers to retrieve details such as device unique ID, brand, model, OS version, system name, application build number, and more. The current stable version is 15.0.2, released in early 2026. The package maintains a frequent release cadence, often issuing multiple patch and minor versions monthly, with major versions typically arriving a few times a year, indicating active development and timely updates for new device capabilities and platform changes. Its key differentiators include broad platform support, a rich API covering a wide range of device properties, and a commitment to keeping up with the latest React Native and platform SDK versions, which sometimes introduces breaking changes related to compilation targets or permissions.
npm install react-native-device-infoVerified import paths — ran on the pinned version, not inferred.
This React Native component demonstrates how to fetch and display various device and application details using `react-native-device-info`'s named and default exports. It fetches asynchronous details like unique ID and manufacturer, along with synchronous details like system name, and renders them in a simple UI.
Update `compileSdkVersion` in your `android/build.gradle` file to 34 or higher.
Manually add the `com.google.android.gms:play-services-iid` dependency and declare `AD_ID` permission in `AndroidManifest.xml` if your application explicitly requires it.
Update your iOS Podfile to specify `platform :ios, '10.0'` or higher.
Ensure your project is migrated to AndroidX, or follow the `jetifier` documentation for reverse mode if sticking to older support libraries.
Add `-keep class com.android.installreferrer.api.** {*;}` and `-keep class com.google.android.gms.common.** {*;}` to your Proguard configuration (`proguard-rules.pro`).Ensure your React Native version is >=0.63 for automatic linking. For older versions, carefully follow the manual linking instructions specific to your React Native version, or upgrade React Native.
Ensure your React Native project is correctly set up for autolinking (React Native >= 0.63). If you are on an older version or using a specific setup, manually verify all linking steps for iOS, Android, and other platforms. Consider running `npx react-native doctor` for diagnostics.
Review your `android/build.gradle` files (root and app level) for multiple versions or conflicting inclusions of Google Play Services libraries. Use `gradlew :app:dependencies` to identify duplicates and exclude them if necessary.
Update `compileSdkVersion` in your `android/build.gradle` file to at least 34. For example: `ext { compileSdkVersion = 34 }`.Upgrade `react-native-device-info` to version 14.1.1 or higher to resolve the NullPointerException in the `hasKeyboard` function on Android.