GitHub project

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.

React Native, Expo, and Flutter apps

This page is for native iOS apps. React Native, Expo, and Flutter apps get the iOS SDK through their Customer.io package, so follow that package’s upgrade guide instead: React Native 8.0.0, Expo plugin 5.0.0, or Flutter 6.0.0.

What stays the same

  • Your import statements. Each Swift package product builds the same module as the pod it replaces, like import CioDataPipelines and import CioMessagingPushAPN.
  • Your initialization code, Info.plist keys, 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-ios
  • https://github.com/customerio/cdp-analytics-swift
  • https://github.com/customerio/jist
  • https://github.com/LaunchDarkly/swift-eventsource
  • https://github.com/segmentio/sovran-swift
  • https://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.

BASH
xcodebuild -resolvePackageDependencies -workspace ios/YourApp.xcworkspace -scheme YourApp

Cache the packages on your CI

A build that starts without a cached copy of these packages, like one on a new CI runner, downloads them each time. To keep them between builds, pass -clonedSourcePackagesDirPath to xcodebuild with a folder that your CI caches.

Which product replaces each pod

Pod in your PodfileSwift package product
CustomerIODataPipelines, CustomerIO/DataPipelines, or CustomerIO with no subspecDataPipelines
CustomerIOMessagingPushAPN or CustomerIO/MessagingPushAPNMessagingPushAPN
CustomerIOMessagingPushFCM or CustomerIO/MessagingPushFCMMessagingPushFCM
CustomerIOMessagingPush or CustomerIO/MessagingPush, with no APNs or FCM podMessagingPush, 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/FirebaseWrapperCioFirebaseWrapper, plus Firebase. See FCM apps.
CustomerIOMessagingInApp or CustomerIO/MessagingInAppMessagingInApp
CustomerIOMessagingInbox or CustomerIO/MessagingInboxMessagingInbox
CustomerIOLocation or CustomerIO/LocationLocation
CustomerIOLocationGeofence or CustomerIO/LocationGeofenceLocationGeofence
CustomerIOLiveActivities or CustomerIO/LiveActivitiesLiveActivities
CustomerIOLiveActivitiesAttributes or CustomerIO/LiveActivitiesAttributesLiveActivities_Attributes
CustomerIOLiveActivitiesTemplates or CustomerIO/LiveActivitiesTemplatesLiveActivities_Templates
CustomerIOCommon, CustomerIOTrackingMigration, or CustomerIO/MigrationNone. These come with the other products.

Upgrade process

1. Remove the Customer.io pods

  1. Note the Customer.io version in your Podfile.lock, like CustomerIODataPipelines (5.3.2). You need it in the next step, and the steps below remove it from the lock file.

  2. 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 with CustomerIO, and each CioFirebaseWrapper line.

    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 removing CioFirebaseWrapper also removes the Firebase pods it installed.

  3. If your Podfile still lists other pods, run pod install. CocoaPods removes the Customer.io pods from your targets.

  4. If your Podfile doesn’t list any other pods, run pod deintegrate, then delete your Podfile, Podfile.lock, and Pods folder. If CocoaPods created your .xcworkspace and it doesn’t hold anything else, delete it too, and open your .xcodeproj from now on.

2. Add the Swift package to your app

  1. In Xcode, go to File > Add Package Dependencies.

  2. Enter https://github.com/customerio/customerio-ios.git.

  3. 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 MessagingPush product, use 5.4.0 or later with either rule.

  4. 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.

  1. Select your project, then your Notification Service Extension target, then the General tab.
  2. Under Frameworks and Libraries, click + and add MessagingPushAPN if you use APNs, or MessagingPushFCM if 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.

  1. Select your project, then your widget extension target, then the General tab.
  2. Under Frameworks and Libraries, click + and add LiveActivities_Attributes. If your widget uses Customer.io’s built-in templates, add LiveActivities_Templates too.

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

  1. In Xcode, go to Product > Clean Build Folder, then build and run your app.
  2. If your project has schemes for your Notification Service Extension or widget, build them too.
  3. 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 the FirebaseMessaging product 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.

Updated December 2, 2026