Getting Started
This guide will help you install and configure react-native-nitro-device-info in your React Native project.
Prerequisites
Before installing, ensure your project meets these requirements:
- React Native: 0.68 or higher (New Architecture support)
- iOS: Deployment target 13.4 or higher
- Android: minSdkVersion 24 or higher (Android 7.0 Nougat)
- Node.js: 22.11.0 or higher
Installation
Install the library and its peer dependency using your preferred package manager:
Important:
react-native-nitro-modules>=0.35.0 <1.0.0 is required as a peer dependency for JSI bindings.
Platform Setup
iOS Configuration
After installation, install the CocoaPods dependencies:
That's it! The iOS setup is complete.
Android Configuration
No additional configuration needed! Gradle auto-linking handles everything automatically.
The library will be automatically linked when you build your Android app.
Verify Installation
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!
Next Steps
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:
- Explore the API Reference for all available methods
- View Examples for common use cases
- Check out the Migration Guide if coming from
react-native-device-info
