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