React Native SDK 3.0 to 3.1
What changes when you move the Grovs React Native wrapper from 3.0.x to 3.1.0, which wraps iOS SDK 3.1 and Android SDK 3.1.0.
react-native-grovs-wrapper 3.1.0 moves to iOS SDK 3.1 and Android SDK 3.1.0. It adds push campaigns, in-app messages and linkDetails, and removes the messages inbox. Most apps bump the packages, run pod install and fix what TypeScript flags.
Requirements are unchanged: React Native 0.70 or later, iOS 13.0, Android 5.0 (API 21).
Checklist
- Bump the packages: the wrapper,
io.grovs:Grovsin your app'sbuild.gradle, and the iOS pods. - Handle an optional
DeeplinkResponse.link. - Remove native in-app delegates and listeners you set yourself.
- Remove the messages inbox from your UI.
- Rename custom events that use a reserved name.
- Check the other behavior changes.
- Optional: set up push campaigns and react to in-app messages.
1. Bump the packages
npm install react-native-grovs-wrapper@latestIn android/app/build.gradle:
implementation 'io.grovs:Grovs:3.1.0'The podspec now depends on Grovs ~> 3.1. Run pod install in ios/. If CocoaPods keeps the locked 3.0 version, run pod update Grovs.
Expo: the plugin writes the new Android dependency for you. Run npx expo prebuild --clean, so the configure calls are regenerated too (the plugin skips files that already contain Grovs.configure). Save manual native edits first.
2. Handle an optional link
DeeplinkResponse.link is now link?: string. A tapped push campaign without a link arrives with data only. TypeScript flags code that uses link as a string:
Grovs.onDeeplinkReceived((response) => {
if (response.link) {
analytics.log('opened_link', response.link);
}
// route on response.data as before
});3. Remove native in-app delegates and listeners
The wrapper sets Grovs.inAppDelegate on iOS and Grovs.setInAppListener on Android, and forwards their callbacks to onInAppMessage. Remove any you set in native code; otherwise onInAppMessage gets no events.
On iOS, keep the configure delegate as GrovsWrapperSwift.shared (what the Expo plugin injects) or nil. Don't pass your own GrovsDelegate.
4. Remove the messages inbox
The inbox is gone from the backend and the native 3.1 SDKs. In-app messages replace it.
displayMessages()is deprecated, shows nothing and resolves.numberOfUnreadMessages()is deprecated and always resolves0.- Both still reject with
'SDK_DISABLED'while the SDK is disabled.
Remove inbox buttons and unread badges.
5. Rename reserved event names
track now refuses the in-app, push and journey event names. Rename any custom event that uses one:
in_app_viewed, in_app_clicked, in_app_dismissed, in_app_answered, in_app_commented, in_app_held, push_open, push_delivered, push_held, journey_entered, journey_held, journey_path.
A refused event is logged natively and dropped; track doesn't throw.
6. Other behavior changes
- In-app messages show on their own. Live in-app campaigns in your project start showing after the upgrade, with no code. Use pause and excluded screens for flows where they shouldn't appear.
- Error codes.
logInAppPurchaseandlogCustomPurchaserejections now keep the nativecode, like the other promise methods. - Desktop redirect on Android.
generateLinknow forwards thedesktopentry's ownopen_if_app_installed. Before, Android sent theiosflag (new architecture) ortrue(legacy bridge). - Push token on Android. When Firebase Messaging is in the app, the wrapper fetches the FCM token itself when its native module starts.
Verify the upgrade
- Build both platforms and fix any TypeScript errors on
response.link. - Open a Grovs link and check that
onDeeplinkReceivedstill receives it. - Call
Grovs.setIdentifierwith your own ID. In the dashboard, create an in-app campaign triggered on app open, use Send test, and bring the app to the foreground. The message shows at the next sync, andonInAppMessagegets ashownevent. - If you use push, send a campaign to your own user and tap it.
onDeeplinkReceivedgets the push, and the open shows in the campaign report.
Native changes: iOS 3.1 upgrade guide.