Move from CocoaPods to Swift Package Manager (5.4.0)
Starting with version 5.4.0, the iOS SDK is only available as a Swift package. Version 5.3.2 is the last version on CocoaPods, so if you install the SDK with CocoaPods, move to Swift Package Manager to keep getting updates.
What changed?
CocoaPods’ central repository (trunk) stopped accepting new versions on December 2, 2026, so version 5.3.2 is the last version of the iOS SDK that Customer.io publishes as CocoaPods pods. Starting with version 5.4.0, Customer.io releases the SDK only as a Swift package: a git tag of the customerio-ios repository, with a GitHub release.
If you install the SDK with CocoaPods, your app stays on 5.3.2 and doesn’t get later fixes or features until you move to Swift Package Manager. If you already use Swift Package Manager, update the way you update any other package.
Every 5.x release is available as a Swift package with the same modules as its pods, so you can move to Swift Package Manager at the version you’re on and upgrade later. There’s one exception: if your app uses the core push pod (CustomerIOMessagingPush) without an APNs or FCM pod, move to 5.4.0 or later, because its MessagingPush product is new in 5.4.0. If you’re on version 4.x or earlier, some pods don’t have a product at the same version, so upgrade to 5.x first.
What stays the same
- Your
importstatements. Each Swift package product builds the same module as the pod it replaces, likeimport CioDataPipelinesandimport CioMessagingPushAPN. - Your initialization code,
Info.plistkeys, entitlements, and App Group setup. - The code in your Notification Service Extension and Live Activity widget.
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 YourAppWhich product replaces each pod
Pod in your Podfile | Swift package product |
|---|---|
CustomerIODataPipelines, CustomerIO/DataPipelines, or CustomerIO with no subspec | DataPipelines |
CustomerIOMessagingPushAPN or CustomerIO/MessagingPushAPN | MessagingPushAPN |
CustomerIOMessagingPushFCM or CustomerIO/MessagingPushFCM | MessagingPushFCM |
CustomerIOMessagingPush or CustomerIO/MessagingPush, with no APNs or FCM pod | MessagingPush, in version 5.4.0 or later. If you also use an APNs or FCM pod, that product includes MessagingPush, so you don’t need to add it. |
CioFirebaseWrapper, CioFirebaseWrapper/Core, CioFirebaseWrapper/FirebaseMessaging, or CustomerIO/FirebaseWrapper | CioFirebaseWrapper, plus Firebase. See FCM apps. |
CustomerIOMessagingInApp or CustomerIO/MessagingInApp | MessagingInApp |
CustomerIOMessagingInbox or CustomerIO/MessagingInbox | MessagingInbox |
CustomerIOLocation or CustomerIO/Location | Location |
CustomerIOLocationGeofence or CustomerIO/LocationGeofence | LocationGeofence |
CustomerIOLiveActivities or CustomerIO/LiveActivities | LiveActivities |
CustomerIOLiveActivitiesAttributes or CustomerIO/LiveActivitiesAttributes | LiveActivities_Attributes |
CustomerIOLiveActivitiesTemplates or CustomerIO/LiveActivitiesTemplates | LiveActivities_Templates |
CustomerIOCommon, CustomerIOTrackingMigration, or CustomerIO/Migration | None. These come with the other products. |
Upgrade process
1. Remove the Customer.io pods
-
Note the Customer.io version in your
Podfile.lock, likeCustomerIODataPipelines (5.3.2). You need it in the next step, and the steps below remove it from the lock file. -
In your
Podfile, delete every Customer.io line in every target, including your app, your Notification Service Extension, and your Live Activity widget: each pod whose name starts withCustomerIO, and eachCioFirebaseWrapperline.If you use FCM, read FCM apps first. If you want to keep getting Firebase from CocoaPods, add
pod 'FirebaseMessaging'to your app target now, because removingCioFirebaseWrapperalso removes the Firebase pods it installed. -
If your
Podfilestill lists other pods, runpod install. CocoaPods removes the Customer.io pods from your targets. -
If your
Podfiledoesn’t list any other pods, runpod deintegrate, then delete yourPodfile,Podfile.lock, andPodsfolder. If CocoaPods created your.xcworkspaceand it doesn’t hold anything else, delete it too, and open your.xcodeprojfrom now on.
2. Add the Swift package to your app
-
In Xcode, go to File > Add Package Dependencies.
-
Enter
https://github.com/customerio/customerio-ios.git. -
Set the Dependency Rule:
- To move without changing your SDK version, choose Exact Version and enter the version you noted from your
Podfile.lock. - To get later fixes, choose Up to Next Major Version, starting from the version you’re on.
If you’re replacing the core push pod with the
MessagingPushproduct, use 5.4.0 or later with either rule. - To move without changing your SDK version, choose Exact Version and enter the version you noted from your
-
Click Add Package. In the product list, add each product that replaces a pod you removed (see Which product replaces each pod), and choose your app target in the Add to Target column.
3. Add the push product to your notification service extension
Skip this step if your app doesn’t have a Notification Service Extension. Your app uses the extension to show images in rich push notifications and to report Delivered metrics.
- Select your project, then your Notification Service Extension target, then the General tab.
- Under Frameworks and Libraries, click + and add
MessagingPushAPNif you use APNs, orMessagingPushFCMif you use FCM.
Add only that product. Your extension doesn’t need any other Customer.io product or Firebase. If your extension’s code imports CioDataPipelines, as our earlier custom completion handler example did, remove that import, because the push products don’t include that module.
4. Add the Live Activity products to your widget extension
Skip this step if your app doesn’t have a Live Activity widget.
- Select your project, then your widget extension target, then the General tab.
- Under Frameworks and Libraries, click + and add
LiveActivities_Attributes. If your widget uses Customer.io’s built-in templates, addLiveActivities_Templatestoo.
Don’t add other Customer.io products to your widget. These two products don’t depend on the rest of the SDK, so the full SDK stays out of your extension.
5. Build and check your app
- In Xcode, go to Product > Clean Build Folder, then build and run your app.
- If your project has schemes for your Notification Service Extension or widget, build them too.
- Send a test push notification. If you use Live Activities, start a test activity too. Check that both extensions still work.
If your release builds fail with Signing for "Customer.io_CioMessagingPushAPN" requires a development team, or the same error for another Customer.io_ target, see Release archive fails to sign Customer.io_ targets.
If your app also uses LaunchDarkly’s iOS SDK and Xcode can’t resolve packages, see 'customerio-ios' is incompatible with 'ios-client-sdk'.
FCM apps
The CioFirebaseWrapper pod installed Firebase Messaging for you, unless you used CioFirebaseWrapper/Core. The CioFirebaseWrapper Swift package product doesn’t include Firebase. It finds Firebase Messaging in your app when your app runs, so your app needs to include Firebase Messaging itself. Choose one of these options:
- Firebase from Swift Package Manager (recommended): In Xcode, go to File > Add Package Dependencies, add
https://github.com/firebase/firebase-ios-sdk, and add theFirebaseMessagingproduct to your app target. - Firebase from CocoaPods: If your app keeps other pods, keep or add
pod 'FirebaseMessaging'in your app target. Your Customer.io products stay on Swift Package Manager.
Either way, use Firebase 8.7.0 or later, below 14.0.0. If your app registers Firebase Installation IDs instead of FCM tokens, use Firebase 12.19.0 or later.
Add Firebase in only one of these ways, so your app has a single copy of Firebase.
If your app links Firebase statically, make sure your app target includes -ObjC in Build Settings > Other Linker Flags. CocoaPods might have added this flag for you, and the flag goes away with your pods. Without it, the linker can leave Firebase Messaging out of your app, and then MessagingPushFCM.initialize stops your app with a message that Firebase Messaging isn’t linked.
Need help?
If you run into problems moving your app to Swift Package Manager, open an issue in the customerio-ios repository.