Upgrade from 4.x to 5.0.0
Version 5.0.0 of the Customer.io Flutter SDK uses version 5.0.0 of our native iOS and Android SDKs. It requires Flutter 3.44 or later, iOS 15 or later, and Android 7.0 (API level 24) or later.
What changed?
Version 5.0.0 of the Flutter SDK uses version 5.0.0 of the Customer.io iOS and Android SDKs. This raises the minimum versions your app needs:
- Flutter 3.44 or later and Dart 3.12 or later: If your app uses an older version of Flutter, stay on version 4.x.
- iOS 15 or later
- Android 7.0 (API level 24) or later: The Android SDK also brings in
firebase-messaging26.0.0,play-services-base18.11.1, and WorkManager (androidx.work) 2.12.0.
On iOS, the plugin now gets CioFirebaseWrapper from the customerio-ios package. It no longer uses the separate customerio-ios-fcm package.
You don’t need to change your Dart code or your AppDelegate.
Upgrade process
-
Update the SDK version in your
pubspec.yaml, and then runflutter pub get:YAMLdependencies: customer_io: ^5.0.0 -
Raise your iOS deployment target to 15.0. In Xcode, set it for your Runner target and your NotificationServiceExtension target. If you use CocoaPods, update the platform in
ios/Podfiletoo:RUBYplatform :ios, '15.0' -
In your
android/app/build.gradlefile, setminSdkto 24 or higher. Make sure your app builds withcompileSdk36 or later and Android Gradle plugin (AGP) 8.9.1 or later. -
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. -
If you set up live notifications, change the
CustomerIOLiveActivitiesTemplatesandCustomerIOLiveActivitiesAttributesversions in your widget extension’s Podfile target to5.0.0. -
Update your iOS dependencies:
CocoaPods
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 4.x. Your
Podfile.lockstill lists the 4.x pods, so a plainpod installstops with an error, andpod repo updatedoesn’t fix it.Swift Package Manager (SPM)
Flutter resolves version 5.0.0 of
customerio-iosfor you. If you added thecustomerio-ios-fcmpackage to your Xcode project, remove it. In Xcode, select your project, go to Package Dependencies, selectcustomerio-ios-fcm, and click -.If you added the
customerio-iospackage to your Xcode project yourself, for example for a live notifications widget extension, change its version to exactly5.0.0in Package Dependencies. The plugin requires exactly 5.0.0, so Xcode can’t resolve packages while your project asks for a 4.x version.If you use FCM, make sure
firebase_messagingis in yourpubspec.yaml. TheCioFirebaseWrapperincustomerio-iosdoesn’t include Firebase, so your app getsFirebaseMessagingfrom thefirebase_messagingpackage.