Integrate Flurry SDK for React Native¶
Integrating with the Flurry SDK is easy and straightforward for React Native developers.
Follow these instructions and in no time at all, you’ll be ready to start logging events and monetizing your apps.
Prerequisites: Flurry React Native wrapper supports Android API level 16 and higher, and Xcode 8 and iOS 8 and higher.
Create an App & Get Your API Key¶
Start by creating an app. Once you create the app, you’ll receive a Flurry API Key, which you’ll need when using the SDK.
You need to have the administrator role on your company’s account to be able to create a new app within the company.
For each distinct app that you create, you’ll need to acquire a unique Flurry API Key. I.e., you’ll need two API keys if you are going to release on both Android and iOS platforms.
Install Flurry SDK React Native wrapper¶
If it’s the first time you are using Node, please visit Node.js for the installation instructions.
To create your React Native app, you can follow the Getting Started section to install and build your first React Native app.
Add the following calls to use the Flurry SDK by importing Flurry in your Application and initialize the Flurry SDK with your project’s API key:
Addtional options for settings prior to invoking init:
- Flurry.withCrashReporting(boolean); - Flurry.withContinueSessionMillis(number); - Flurry.withIncludeBackgroundSessionsInMetrics(boolean); - Flurry.withLogEnabled(boolean); - Flurry.withLogLevel(number);
Now test run your app and ensure that it builds without errors. If everything is working properly, a session will be recorded in Flurry and should be visible on your Real Time dashboard within 30 seconds.
If you created the Flurry app within the last 5 minutes, the app may not yet be live on our servers and thus will not reflect real-time data. Re-run your app after 5 minutes to see your session recorded on the Real Time dashboard.
Congratulations! Your React Native app is now ready to be used with Flurry Analytics.
Was this document helpful?