Upgrade from 7.x to 8.0.0
Version 8.0.0 of the Customer.io React Native SDK gets our native iOS SDK from its Swift package instead of CocoaPods pods. If your app uses CocoaPods, your Podfile keeps working. On React Native 0.88 or later, you can also move to React Native's Swift Package Manager mode.
What changed?
CocoaPods’ central repository (trunk) stopped accepting new versions on December 2, 2026, so new versions of the Customer.io iOS SDK are only published as a Swift package. Version 8.0.0 of the React Native SDK gets the iOS SDK from that Swift package, and your app doesn’t install any Customer.io pods.
Your JavaScript code, your AppDelegate code, the code in your notification service extension and Live Activity widget, and your Android app don’t change.
- You can keep CocoaPods. Your 7.x
Podfilekeeps working, andpod installadds the iOS SDK to thecustomerio-reactnativepod as a Swift package. - On React Native 0.88 or later, you can move to React Native’s Swift Package Manager mode instead. React Native then builds every native library in your app as a Swift package, and you choose the SDK’s push provider and optional modules in
android/gradle.properties. - Your app can’t install the iOS SDK’s own pods. If your
PodfilenamesCioFirebaseWrapperor a pod whose name starts withCustomerIO,pod installstops and tells you what replaces it. - Your Live Activity widget uses the Swift package instead of the
CustomerIOLiveActivitiesAttributesandCustomerIOLiveActivitiesTemplatespods. - Your build needs Xcode 16 or later, and access to GitHub. See Xcode and network access.
If you use Expo, follow Upgrade from 4.x to 5.0.0 instead.
Before you upgrade
- React Native version: Your app must use React Native’s New Architecture, as it has since version 6.0.0 of the SDK. On iOS, you need React Native 0.79 or later with CocoaPods, or 0.88 or later in Swift Package Manager mode. On Android, React Native 0.77 or later still works.
- React Native Firebase: React Native Firebase doesn’t build in Swift Package Manager mode, so keep CocoaPods. See React Native Firebase.
- Release signing: If your release build passes one signing identity to every target, like fastlane’s
codesigning_identityorxcodebuild CODE_SIGN_IDENTITY=..., the archive fails to sign the SDK’sCustomer.io_targets. Change that before your first release archive. See Release archive fails to signCustomer.io_targets.
Xcode and network access
The Customer.io iOS SDK’s Swift package needs Xcode 16 or later, because one of the packages it depends on requires Swift 6 tools. Your framework might need a later version. For example, React Native 0.81 and later need Xcode 16.1 or later. If you send push notifications through FCM, you should also check Firebase’s iOS release notes for the Xcode version that your Firebase release needs.
Xcode downloads the SDK and the packages it depends on from GitHub when it resolves packages. If your build machines or CI can’t reach github.com, allow access to these repositories or mirror them:
https://github.com/customerio/customerio-ioshttps://github.com/customerio/cdp-analytics-swifthttps://github.com/customerio/jisthttps://github.com/LaunchDarkly/swift-eventsourcehttps://github.com/segmentio/sovran-swifthttps://github.com/segmentio/jsonsafeencoding-swift
If you commit Package.resolved, update it after each SDK update. Resolve packages once for the workspace or project that your CI builds, without -onlyUsePackageVersionsFromResolvedFile or -disableAutomaticPackageResolution, and commit the updated file. CI builds that use those options need the updated file to find the new SDK version.
xcodebuild -resolvePackageDependencies -workspace ios/YourApp.xcworkspace -scheme YourAppUpgrade process
-
Update the SDK:
BASHnpm install customerio-reactnative@8 # or yarn add customerio-reactnative@8 -
Choose how your iOS app installs native libraries, and follow that section:
- Keep CocoaPods if your app uses React Native Firebase, uses React Native 0.79 to 0.87, or has native libraries that don’t support Swift Package Manager mode.
- Otherwise, you can move to Swift Package Manager mode.
Keep CocoaPods
-
Keep your 7.x subspecs, and
pod 'customerio-reactnative-richpush/apn'(or/fcm) in your notification service extension’s target. Each subspec adds the same parts of the iOS SDK as in 7.x. See Podfile subspecs. If yourPodfilealso names the iOS SDK’s own pods,CioFirebaseWrapperor pods whose names start withCustomerIO, replace them before you runpod install. Seepod installstops because of Customer.io pods. -
If you set up live notifications, update your Live Activity widget.
-
From your
iosfolder, runpod install. CocoaPods removes the old Customer.io pods from your project.BASHcd ios && pod install -
Build your app from your
.xcworkspace, as before. If you commitPackage.resolved, commit the version that this build writes. See Xcode and network access.
Update your Live Activity widget
- In your
ios/Podfile, removepod 'CustomerIOLiveActivitiesAttributes'andpod 'CustomerIOLiveActivitiesTemplates'from your widget target. If nothing else is left in that target, remove the target block too. - Open your
.xcworkspacein Xcode and go to File > Add Package Dependencies. - Enter
https://github.com/customerio/customerio-ios.git. - Set the Dependency Rule to Up to Next Major Version, starting from the major version of
cioNativeiOSSdkVersioninnode_modules/customerio-reactnative/package.json, like5.0.0. Don’t choose Exact Version, because it conflicts with the next SDK update that moves the iOS SDK version. - Click Add Package, and add LiveActivities_Attributes and LiveActivities_Templates to your widget target.
Podfile subspecs
Subspec in your Podfile | What your app gets |
|---|---|
None, or nopush | No push provider. |
apn | Push notifications over APNs. |
fcm | Push notifications over FCM, and the FirebaseMessaging pod (version 8.7 or later, below 14), as in 7.x. Your app’s other Firebase pods share it. |
fcm-core | Push notifications over FCM, using the FirebaseMessaging that your app adds itself. |
location, geofence, liveactivities | That module. geofence turns on location as well. |
You can’t combine apn with fcm or fcm-core: pod install stops and asks you to choose one.
Firebase 12 is the last version of Firebase that’s published as CocoaPods pods. If you want Firebase 13 or later, use fcm-core and add Firebase to your app yourself.
Instead of subspecs, you can set global variables at the top of your ios/Podfile, before any target. If you use both, the subspecs add to the global variables.
# ios/Podfile, at the top
$customerio_push_provider = 'apn' # or 'fcm', 'fcm-core'
$customerio_location_enabled = true
$customerio_geofence_enabled = true
$customerio_live_activities_enabled = trueAs in 7.x, your iOS build ignores android/gradle.properties when you use CocoaPods, so its location and geofence keys only turn those modules on for Android. Run pod install whenever you change a subspec or a global variable.
The SDK works with or without use_frameworks!, and with static or dynamic frameworks. Firebase’s pods, like the one the fcm subspec adds, still need use_frameworks!, as in 7.x. With Xcode 27, they also need the SDK’s deployment-target helper, because a pod that Firebase depends on targets iOS 9.
React Native Firebase
React Native Firebase brings its own FirebaseMessaging, so use the fcm-core subspec, as in 7.x. Set up React Native Firebase in one of these ways:
- Firebase as Swift packages, React Native Firebase’s default and the only setup that version 27 and later support: use React Native Firebase 26.3.3 or later, with
use_frameworks! :linkage => :dynamic, which React Native Firebase requires. With versions 26.1 to 26.3.2, an app built after a freshpod installcan fail at launch withLibrary not loaded: @rpath/Firebase.framework/Firebase, even without Customer.io. - Firebase as pods: add
$RNFirebaseDisableSPM = trueand$RNFirebaseAsStaticFramework = trueat the top of yourPodfile, and useuse_frameworks! :linkage => :static. With Xcode 27, also add the deployment-target helper.
In your AppDelegate, import FirebaseCore, CioMessagingPushFCM, and CioFirebaseWrapper, and call FirebaseApp.configure() before MessagingPushFCM.initialize. React Native Firebase’s messaging module also reads your AppDelegate’s window property when your app launches, and the React Native 0.88 template’s AppDelegate doesn’t have one, so add it:
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
// ...
}Move to React Native’s Swift Package Manager mode
This mode needs React Native 0.88 or later. React Native builds every native library in your app as a Swift package, so each library needs a Package.swift file or a plugin that links it in this mode, or you convert it with npx react-native spm scaffold. If one of your libraries doesn’t build in this mode, keep CocoaPods.
Convert your app
-
From your app’s folder, run:
BASHnpx react-native spm add --deintegrateThis command removes CocoaPods from your Xcode project, removes React Native from your
Podfile, and adds React Native’s Swift packages, including the Customer.io SDK, to your app target. If your project has more than one app target, name yours:BASHnode node_modules/react-native/scripts/setup-apple-spm.js add --deintegrate --product-name YourAppCommit the changes to your Xcode project.
-
Update
ios/Podfile. CocoaPods doesn’t run anymore, but on React Native 0.88, React Native’s command-line tool finds your iOS project through this file, and thePodfilethatspm addleaves isn’t valid Ruby. Replace its contents with a comment saying that your app uses Swift Package Manager mode. On React Native 0.89,spm addleaves yourPodfileas it was, so remove its Customer.io lines (customerio-reactnative,customerio-reactnative-richpush, andCustomerIOLiveActivities*) and anypost_installcode you added for the SDK. -
Delete
ios/YourApp.xcworkspaceif CocoaPods created it, and buildios/YourApp.xcodeprojfrom now on.spm add --deintegrateleaves the workspace in place, andnpx react-native run-iospicks a workspace over your project. -
Exclude
ios/buildfrom TypeScript and your linter. React Native links native library sources intoios/build/generated, and tools that check your whole app would check them too. For example, intsconfig.json:JSON"exclude": ["**/node_modules", "ios/build"]
On React Native 0.89:
- The
npx react-native spmcommand comes from@react-native/community-cli-plugin. The 0.89 template lists it indevDependencies. If your app doesn’t, add it at your React Native version. - If your app target’s build configurations are based on your own
.xcconfigfiles, React Native asks you to#includeits generatedios/ReactNativeSPM/ReactNativeSPM.xcconfigfile from them, and prints the line to add.
Choose your push provider and modules
The SDK reads its iOS settings from android/gradle.properties, using the same keys as the Android build. If your app has no android folder, create one next to your package.json, and put gradle.properties in it, because without that file your app gets no push provider or optional modules. Move each subspec from your Podfile to its key:
| 7.x subspec | android/gradle. |
|---|---|
None, or nopush | Nothing. By default, your app has no push provider. |
apn | customerio_push_provider=apn |
fcm or fcm-core | customerio_push_provider=fcm. Your app adds FirebaseMessaging itself. See Add Firebase. |
location | customerio_location_enabled=true |
geofence | customerio_geofence_enabled=true (turns on location as well) |
liveactivities | customerio_live_activities_enabled=true |
Every module is off unless you turn it on. The Android build ignores customerio_push_provider.
Add the SDK to your app extensions
React Native adds its Swift packages to your app target only, so your app extensions need the Customer.io Swift package too.
- In Xcode, go to File > Add Package Dependencies.
- Enter
https://github.com/customerio/customerio-ios.git. - Set the Dependency Rule to Up to Next Major Version, starting from the major version of
cioNativeiOSSdkVersioninnode_modules/customerio-reactnative/package.json, like5.0.0. Xcode resolves your range to the exact version the SDK uses, including after SDK updates within the same major version. - Add the products for your extensions:
- Notification service extension (rich push): add MessagingPushAPN or MessagingPushFCM to the extension target, in place of the
customerio-reactnative-richpushpod. - Live Activity widget: add LiveActivities_Attributes and LiveActivities_Templates to the widget target, in place of the
CustomerIOLiveActivitiesAttributesandCustomerIOLiveActivitiesTemplatespods.
- Notification service extension (rich push): add MessagingPushAPN or MessagingPushFCM to the extension target, in place of the
Add Firebase (FCM only)
With customerio_push_provider=fcm, the SDK uses the FirebaseMessaging in your app and doesn’t add Firebase of its own. In Xcode, go to File > Add Package Dependencies, enter https://github.com/firebase/firebase-ios-sdk, and add FirebaseMessaging to your app target. In your AppDelegate, import FirebaseCore and FirebaseMessaging from Firebase’s package.
Without FirebaseMessaging in your app, MessagingPushFCM.initialize stops your app at launch, as in 7.x.
Build your app
Run npx react-native spm update once after you install or update the SDK, and again whenever you change a key in android/gradle.properties. Then build:
npx react-native run-iosIf you build without running spm update, the build stops with a message that the SDK’s Swift package changed during the build. Build again, and that build uses your new settings. On React Native 0.88.0, if you created android/gradle.properties after your last spm update, run npx react-native spm update again.
In your CI builds:
- Replace
pod installwithnpx react-native spm update, afternpm ci. - Build with
-project ios/YourApp.xcodeprojinstead of-workspace. - Optionally, cache
~/Library/Caches/ReactNative/spm-artifacts, where React Native downloads its prebuilt frameworks. - If you commit
Package.resolved, update it after each SDK update. See Xcode and network access.
Troubleshooting
pod install stops because of Customer.io pods
pod install stops with a message that begins customerio-reactnative 8 gets customerio-ios from its Swift package and can't be installed with customerio-ios's CocoaPods pods, followed by the pods it found. Remove the Podfile lines that add them:
- For a module or push pod in your app target, like
CustomerIOLocation,CustomerIOLocationGeofence,CustomerIOLiveActivities,CustomerIOMessagingPushAPN,CustomerIOMessagingPushFCM, orCioFirebaseWrapper, turn that module or push provider on with its subspec or Podfile global variable instead, or your app loses it. The message lists the subspec or global variable for each pod. - For the Live Activity widget pods, follow Update your Live Activity widget.
pod install stops with customerio-reactnative needs React Native 0.79 or later on iOS
From version 8.0.1, pod install stops on React Native 0.78 and earlier when it installs the SDK’s main pod through use_react_native!. React Native doesn’t register the SDK’s native modules before 0.79, so your app would build and the SDK would do nothing on iOS. Update React Native to 0.79 or later, then run pod install again.
pod install stops with customerio-reactnative can't add customerio-ios to its pods
From version 8.0.1, pod install stops when your CocoaPods version doesn’t have the installer steps that the SDK uses to add the iOS SDK’s Swift package to its pods, and React Native’s spm_dependency support isn’t loaded. Without this check, your build would fail later with No such module. Use CocoaPods 1.13 to 1.17, except 1.15.0 and 1.15.1, which React Native excludes. If you need another version, open an issue with your CocoaPods version.
pod install puts the rich push pod in your app target
If pod install stops because an app target installs customerio-reactnative-richpush, or because CocoaPods finds two sources for it, your app gets the SDK from a folder that isn’t named customerio-reactnative, like a workspace package or a file: link. Set the absolute path to the SDK’s customerio-reactnative.podspec file in your app’s react-native.config.js, and point your notification service extension’s :path at the same folder. A relative path makes pod install fail.
const path = require('path');
module.exports = {
dependencies: {
'customerio-reactnative': {
platforms: {
ios: {
// The folder that holds the SDK, here packages/customerio-reactnative next to this file.
podspecPath: path.join(__dirname, 'packages/customerio-reactnative/customerio-reactnative.podspec'),
},
},
},
},
};Xcode 27.2 stops with a consteval error in fmt
Your app builds React Native’s fmt 11.0.2 dependency from source, as React Native 0.83.4 and earlier do by default, and Xcode 27.2 can’t compile it, with or without the Customer.io SDK. Build fmt as C++17 in your Podfile’s post_install block, as the SDK’s migration guide shows.
Your Podfile skips Pods project generation
If your Podfile sets install! 'cocoapods', :skip_pods_project_generation => true, CocoaPods doesn’t generate a Pods project, so pod install can’t add the iOS SDK to the SDK’s pods. Whatever generates your Xcode projects needs to add the Swift package https://github.com/customerio/customerio-ios.git, at exactly the version that cioNativeiOSSdkVersion names in node_modules/customerio-reactnative/package.json, to the targets that build the customerio-reactnative and customerio-reactnative-richpush pods. The SDK’s migration guide lists the products each pod needs.
Building Pods.xcodeproj fails with Packages are not supported when using legacy build locations
The customerio-reactnative pod now includes a Swift package. CocoaPods’ Pods.xcodeproj uses legacy build locations, so Xcode can’t build that package when you build Pods.xcodeproj by itself, as some scripts and pod caching tools do. Build your app’s .xcworkspace instead.
Package.swift is missing for library
In Swift Package Manager mode, another library in your app doesn’t support the mode. Run npx react-native spm scaffold and keep the result with npx patch-package <library>, ask the library’s maintainer to add a Package.swift, or keep CocoaPods.
Push, location, or live notification code fails on iOS
If you don’t turn a module on, your app builds without it:
- Location and geofence calls do nothing, without an error.
- Live notification
start,update, andendcalls reject withlive_activity_module_unavailable, and code that usesNativeLiveActivitiesdoesn’t compile. - Your
AppDelegatedoesn’t compile withNo such module 'CioMessagingPushAPN'or'CioMessagingPushFCM'if you didn’t choose that push provider.
Turn the module or push provider on with its subspec or Podfile global variable, or its gradle.properties key in Swift Package Manager mode. Then run pod install or npx react-native spm update, and rebuild your app.
Undefined symbols for CioLocation or CioLocationGeofence
After you turn a module off, code that you wrapped in #if canImport(...) can still see the module that an earlier build left behind. In Xcode, choose Product > Clean Build Folder once, then build again.
Xcode can’t resolve packages because of LaunchDarkly
If your app also uses LaunchDarkly’s iOS SDK and Xcode can’t resolve packages, see 'customerio-ios' is incompatible with 'ios-client-sdk'.
Release archive fails to sign Customer.io_ targets
If a release archive fails with Signing for "Customer.io_CioMessagingPushAPN" requires a development team, see Release archive fails to sign Customer.io_ targets.