This guide describes how to integrate Iterable's React Native SDK into an existing React Native application that interacts with Iterable.
In this article
Migration instructions
To migrate an existing React Native app that's integrated with Iterable so that it uses Iterable's React Native SDK, follow this high-level overview:
1. Create a sandbox project and fill it with data from your existing app
In Iterable, create a sandbox project. In that project, create a mobile API key. Integrate the new API key in a development version of your existing React Native app, and go through the entire app: sign up, log in, purchase, sharing, manage subscriptions, etc. Then, make sure that your sandbox project has captured all the expected data.
2. Install and initialize Iterable's React Native SDK
To learn how to install Iterable's React Native SDK, read Installing Iterable's React Native SDK.
3. Remove or update manual API calls
Iterable's React Native SDK automatically captures events related to push
notifications and in-app messages. If you have explicit API calls to capture
these events, remove them. Similarly, remove calls to POST /api/users/registerDeviceToken
,
since the SDK handles this manually.
For other API calls such as user updates, manually replace the API call with the appropriate call to an SDK method.
4. Run the app with the SDK, and compare data
Now that you've added the SDK to the app, sign in again—this time as a different user. Use all the app's features, and compare the data generated by the SDK with the data generated before including it. Use the Audience > Contact Lookup screen to make sure that data on both user profiles (pre-SDK and post-SDK) looks similar and has the expected fields and events (including associated data fields). Also verify that field name capitalization and data types are consistent between your projects.
Frequently asked questions
Will all users automatically receive the new version of the app?
After you deploy the app, users will update as their device pulls updates from the app store.
When users upgrade to a new version of my app, what happens to their push tokens?
Push tokens stay the same, unless:
- You change the bundle ID of your app
- A user uninstalls and reinstalls your app
Can I use code push to update the app without the App Store?
It may be possible to use code push to update JavaScript or TypeScript code that accesses Iterable's React Native SDK. However, this has not been tested and is not officially supported.
Further reading
- React Native
- Iterable's React Native SDK (GitHub)
- Iterable's iOS SDK
- Iterable's iOS SDK (GitHub)
- Iterable's Android SDK
- Iterable's Android SDK (GitHub)
- API Overview