Upgrade from 6.x to 7.0.0
Version 7.0.0 of the Customer.io React Native SDK uses version 5.0.0 of our native iOS and Android SDKs. You don't need to change your code, but you need to update your iOS pods once.
What changed?
Version 7.0.0 of the React Native SDK uses version 5.0.0 of the Customer.io iOS and Android SDKs. You don’t need to change your JavaScript code or your AppDelegate. Your Podfile stays the same, unless you set up live notifications.
- iOS 15 and Android 7.0 (API level 24): The native SDKs now require these versions. Every version of React Native that the SDK supports already requires iOS 15.1 and API level 24, so you don’t need to change your deployment target or
minSdkVersion. The SDK’s Android module now defaults to aminSdkVersionof 24. CioFirebaseWrappercomes fromcustomerio-ios: If you send push notifications through Firebase Cloud Messaging (FCM), thecustomerio-reactnative/fcmpod now installsCioFirebaseWrapperfrom thecustomerio-iospackage, at the same version as the rest of the iOS SDK. It no longer uses the separatecustomerio-ios-fcmpackage. The pod still installsFirebaseMessagingfor you.- Newer Android libraries: The Android SDK now brings in
firebase-messaging26.0.0,play-services-base18.11.1, and WorkManager (androidx.work) 2.12.0. - Android build: Your app needs
compileSdk36 or later and Android Gradle plugin 8.9.1 or later. This requirement isn’t new in 7.0.0, but apps on React Native 0.77 to 0.80 might need to raise these versions. See Minimum requirements.
Upgrade process
-
Update the SDK:
BASHnpm install customerio-reactnative@7 # or yarn add customerio-reactnative@7 -
If you set up live notifications, change the
CustomerIOLiveActivitiesTemplatesandCustomerIOLiveActivitiesAttributesversions in your widget extension’s Podfile target to5.0.0. -
Update the Customer.io pods. If you use FCM, run:
BASHcd ios pod update CustomerIO CioFirebaseWrapperIf you use APNs, run
pod update CustomerIOfrom youriosfolder instead.You only need to do this once, when you upgrade from 6.x. Your
Podfile.lockstill lists the 6.x pods, so a plainpod installstops with an error, andpod repo updatedoesn’t fix it. -
If your Android app pins older versions of
firebase-messaging,play-services-base, or WorkManager, update them to at least 26.0.0, 18.11.1, and 2.12.0. -
Rebuild your app.
React Native Firebase 26.1 and later
React Native Firebase 26.1 and later adds Firebase to your iOS app through Swift Package Manager by default. The customerio-reactnative/fcm pod adds Firebase through CocoaPods. When your app has both copies of Firebase, the build fails. Versions 6.x and 7.0 have this limitation.
Version 7.1.0 adds the customerio-reactnative/fcm-core pod for these apps. It adds no Firebase of its own and uses the FirebaseMessaging that React Native Firebase brings in. It works with React Native Firebase 26.1 and later, including 27.
-
Update
customerio-reactnativeto 7.1.0 or later. -
Install
@react-native-firebase/messagingas well as@react-native-firebase/app. Without FirebaseMessaging in your app, the app stops at launch. -
In your
ios/Podfile, replacecustomerio-reactnative/fcmwithcustomerio-reactnative/fcm-corein your main target. Keepcustomerio-reactnative-richpush/fcmin yourNotificationServiceExtensiontarget (it doesn’t include Firebase), and keepimport CioFirebaseWrapperin your app delegate, sincefcm-coreprovides that module. Change any staticuse_frameworks!line touse_frameworks! :linkage => :dynamic, which React Native Firebase requires. Don’t list bothfcmandfcm-core, becausefcmbrings Firebase back from CocoaPods. If you added$RNFirebaseDisableSPM = trueor$RNFirebaseAsStaticFramework = truefor the earlier workaround, remove both.RUBYuse_frameworks! :linkage => :dynamic target 'YourApp' do config = use_native_modules! pod 'customerio-reactnative/fcm-core', :path => '../node_modules/customerio-reactnative' end target 'NotificationServiceExtension' do pod 'customerio-reactnative-richpush/fcm', :path => '../node_modules/customerio-reactnative' end -
From your
iosfolder, runpod install, then rebuild your app. If you’re upgrading from 6.x, runpod update CustomerIO CioFirebaseWrapperonce instead ofpod install.
If you stay on customerio-reactnative/fcm with React Native Firebase 26.x, add $RNFirebaseDisableSPM = true to your ios/Podfile, before any target block, so React Native Firebase uses CocoaPods too. Keep use_frameworks! :linkage => :static and set $RNFirebaseAsStaticFramework = true, as described in React Native Firebase’s 26.x iOS SPM guide and static frameworks setup. React Native Firebase 27 has no CocoaPods option, so it needs fcm-core.