Upgrade from 8.x to 8.1.0
If your iOS app uses FCM, version 8.1.0 of the Customer.io React Native SDK points you to the fcm-core subspec with Firebase's Swift package to get Firebase 13. If your app uses the fcm subspec, it keeps working on Firebase 12, and you don't need to change anything.
What changed?
Firebase 13 and later are only available as a Swift package. FirebaseMessaging 12.19.0 is the last version that Firebase published as a CocoaPods pod, and the fcm subspec installs that pod, as in 7.x.
- If your app uses the
fcmsubspec, you don’t need to change anything. Your app keeps working on Firebase 12. From version 8.1.0,pod installprints a note that links to the steps for moving to Firebase 13. Firebase 12 doesn’t get any more FirebaseMessaging fixes, so move when you’re ready for Firebase 13. - To get Firebase 13, use the
fcm-coresubspec. It includes the same Customer.io FCM support asfcm, and your app adds FirebaseMessaging from Firebase’s Swift package. Set up push notifications now uses this setup. pod installwarns when an app target gets FirebaseMessaging both as a pod and from Firebase’s Swift package, because your app would link two copies of Firebase. The warning doesn’t stop the install.
The steps on this page are for apps that install their pods with CocoaPods. If your app uses React Native’s Swift Package Manager mode, it already adds FirebaseMessaging from Firebase’s Swift package. If you use Expo, follow the Expo push setup instead.
Before you move
Requirements
- Firebase 13 needs Xcode 26.2 or later, and iOS 15 or later.
- Your build machines and CI need access to github.com, for Firebase’s repositories, and to dl.google.com, for Firebase’s prebuilt binaries.
- The first time Xcode resolves Firebase’s package, it adds about 1.5 GB to its package cache, in
SourcePackagesin DerivedData. Most of the space goes to a prebuilt gRPC binary that Firebase’s package downloads for Firestore, even when your app only uses FirebaseMessaging. On CI, keep that folder between builds. - Firebase doesn’t need
use_frameworks!or the SDK’s deployment-target helper anymore. Keep them if your other pods need them. - Keep
-ObjCin your app target’s Other Linker Flags. React Native’s template sets it.
Check your other pods
Firebase’s Swift package brings its own copies of Google’s libraries: GoogleUtilities, GoogleDataTransport, nanopb, and Promises. Your app can’t link them next to the same libraries from pods. Without frameworks, the build fails with Redefinition of module 'FBLPromises'. With dynamic frameworks, your app builds with two copies of GoogleUtilities and Promises, and the Objective-C runtime reports duplicate classes.
Look at the PODS section of ios/Podfile.lock. Skip FirebaseMessaging and the pods listed under it, because the fcm subspec brings those. If another pod is a Firebase pod, or lists GoogleUtilities, GoogleDataTransport, nanopb, or PromisesObjC as a dependency, keep Firebase on pods for now and stay on fcm. For example, Google Sign-In lists one of these libraries through AppCheckCore, and so does ML Kit.
React Native Firebase
If your app uses React Native Firebase, use fcm-core and let React Native Firebase supply FirebaseMessaging. Don’t add Firebase’s Swift package yourself.
React Native Firebase 27 brings Firebase 13 when you set it up with its default, Firebase as Swift packages, as described in Upgrade from 7.x to 8.0.0. React Native Firebase 27 only takes Firebase from Swift packages, so check your other pods before you upgrade to it. If your app keeps pods that use Google’s libraries, stay on React Native Firebase 26 with Firebase as pods.
Move to Firebase 13
If your app uses React Native Firebase, follow React Native Firebase instead of these steps.
-
Update
customerio-reactnativeto 8.1.0 or later. -
In your
ios/Podfile, changecustomerio-reactnative/fcmtocustomerio-reactnative/fcm-core, or change$customerio_push_provider = 'fcm'to'fcm-core'. If you added your ownpod 'FirebaseMessaging'line, delete it. -
Install your pods:
BASHcd ios && pod installYour
ios/Podfile.lockshouldn’t list FirebaseMessaging anymore. If it still does, another pod brings it. See Check your other pods. -
Open
ios/YourApp.xcworkspacein Xcode, and go to File > Add Package Dependencies. -
Enter
https://github.com/firebase/firebase-ios-sdk.git, and set the Dependency Rule to Up to Next Major Version from13.0.0. -
Click Add Package, and add FirebaseMessaging to your app target only. Your notification service extension keeps its
customerio-reactnative-richpushpod. -
Build your
.xcworkspace, as before. -
Commit
ios/YourApp.xcodeproj/project.pbxprojandios/Podfile.lock. If you commitios/YourApp.xcworkspace/xcshareddata/swiftpm/Package.resolved, commit it too.
Your Swift code doesn’t change. import FirebaseCore, import FirebaseMessaging, import CioMessagingPushFCM, and import CioFirebaseWrapper work as before, and your AppDelegate still calls FirebaseApp.configure() before MessagingPushFCM.initialize. For the Firebase calls that your app makes itself, see Firebase’s iOS release notes for version 13.0.
Troubleshooting
Your app stops at launch with MessagingPushFCM needs FirebaseMessaging, but it isn't linked into the app
Add FirebaseMessaging to your app target in General > Frameworks, Libraries, and Embedded Content, and keep -ObjC in your app target’s Other Linker Flags.
Redefinition of module 'FBLPromises', or Class FIRApp is implemented in both at launch
Your app gets Firebase or Google’s libraries both from pods and from Firebase’s Swift package. See Check your other pods.