This guide will help you install and configure react-native-nitro-device-info in your React Native project.
Before installing, ensure your project meets these requirements:
Install the library and its peer dependency using your preferred package manager:
Important:
react-native-nitro-modules^0.31.0 is required as a peer dependency for JSI bindings.
After installation, install the CocoaPods dependencies:
That's it! The iOS setup is complete.
No additional configuration needed! Gradle auto-linking handles everything automatically.
The library will be automatically linked when you build your Android app.
To verify the installation was successful, add this code to your app:
If you see device information logged to the console, the installation was successful!
Now that you have the library installed, check out the Quick Start guide to learn how to use it in your app.
You can also:
react-native-device-info