Chore: MOBILE-4162 - Upgrade Iterable SDKs & add Swift Package Manager support - #71
Chore: MOBILE-4162 - Upgrade Iterable SDKs & add Swift Package Manager support#71mabidakun wants to merge 37 commits into
Conversation
Chore: Update Iterable SDKs
Chore: Update README.md.
…ch Iterable-iOS-SDK v6.5.2.
Chore: Update Iterable SDKs
Chore: Update plugin to use Iterable Swift `6.5.7`
Chore: MOBILE -140 - Update to support Android 35
Chore: MOBILE-140 - update version 0.6.3
* Updated `MinimumOSVersion` and `IPHONEOS_DEPLOYMENT_TARGET` to 13.0 in relevant files. * Bumped `Iterable-iOS-SDK` dependency to 6.6.4. * Updated Swift version to 5.9. * Adjusted `pubspec.yaml` version to 0.7.0.
* Bumped `minSdkVersion` from 16 to 21 to meet current requirements. * Upgraded Iterable API dependency from `3.5.1` to `3.6.3` for improved functionality.
* Deleted the `.packages` file as it is deprecated in favor of `.dart_tool/package_config.json`. * Removed various build artifacts related to Flutter and Iterable SDKs to clean up the project structure.
…le-SDKs Chore: MOBILE-140 - Upgrade iterable SDKs
…flutter_config→flutter_dotenv)
Adds ios/iterable_flutter/Package.swift so the plugin can be consumed via Swift Package Manager alongside CocoaPods (Flutter falls back to CocoaPods when SPM is off). Verified: SwiftPM resolves Iterable's swift-sdk 6.7.3 and the example builds under SPM. Also gitignores SPM build artifacts (.build/, .swiftpm/). PREREQUISITE — repo rename required for SPM to function: Flutter derives the SwiftPM package identity from the plugin's repository folder basename, which must match the Dart package name (iterable_flutter). This repo is named iterable-flutter (hyphen), so SPM integration fails with "unable to override package ... identity mismatch" until the repo is renamed to iterable_flutter (and consumers update their git URL). Proven by build tests across folder names. CocoaPods is unaffected.
…, module version, pubignore
|
Closing — opened against the wrong repository by mistake. Reopening against SpringCare/iterable-flutter. |
There was a problem hiding this comment.
Code Review
This pull request modernizes the plugin by adding Swift Package Manager support, upgrading the iOS and Android Iterable SDKs, and updating the example app to use Gradle 8.9, AGP 8.7.3, and flutter_dotenv. Feedback on these changes highlights a Gradle configuration error in android/build.gradle where compileSdk is incorrectly placed inside defaultConfig. Additionally, it is recommended to specify a minimum Flutter SDK constraint in the example's pubspec.yaml to support the newly introduced APIs, and to ensure a placeholder .env file exists to prevent asset-not-found build failures.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| android { | ||
| compileSdkVersion 31 | ||
| if (project.hasProperty("android") && project.android.hasProperty("namespace")) { | ||
| namespace = "com.lahaus.iterable_flutter" | ||
| } | ||
|
|
||
| compileOptions { | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| } | ||
|
|
||
| kotlinOptions { | ||
| jvmTarget = JavaVersion.VERSION_1_8 | ||
| } | ||
|
|
||
| sourceSets { | ||
| main.java.srcDirs += 'src/main/kotlin' | ||
| } | ||
| defaultConfig { | ||
| minSdkVersion 16 | ||
| compileSdk 34 | ||
| minSdkVersion 21 | ||
| } |
There was a problem hiding this comment.
In Android Gradle Plugin (AGP), compileSdk is a property of the android block, not defaultConfig. Placing compileSdk 34 inside defaultConfig will cause a Gradle configuration error. Please move compileSdk 34 to the outer android block.
android {
if (project.hasProperty("android") && project.android.hasProperty("namespace")) {
namespace = "com.lahaus.iterable_flutter"
}
compileSdk 34
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 21
}
| environment: | ||
| sdk: ">=2.12.0 <3.0.0" | ||
| sdk: ">=3.0.0 <4.0.0" |
There was a problem hiding this comment.
The example app now uses FlutterImplicitEngineDelegate and UIApplicationSceneManifest (with FlutterSceneDelegate), which require Flutter 3.24 or newer. Running the example app on older Flutter 3.x versions will result in compilation or runtime errors. Consider adding a flutter SDK constraint to the environment block to enforce the minimum required Flutter version.
environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.24.0"| # The .env file is bundled as an asset and read at runtime by flutter_dotenv. | ||
| assets: | ||
| - .env |
There was a problem hiding this comment.
If the .env file is not committed to the repository (or is gitignored), listing it under assets in pubspec.yaml will cause the Flutter build to fail with an asset not found error. Consider committing a dummy .env file or a .env.example file, or ensure that a placeholder .env file is present in the repository so that the example app can be built immediately after cloning.
MOBILE-4162
What does this PR do? 🧐
Upgrades the
iterable_flutterplugin's native Iterable SDKs to the latest and adds Swift Package Manager (SPM) support, releasing v0.8.0.Native SDK upgrades (to latest):
Iterable-iOS-SDK6.6.4→6.7.3(includes the iOS 18 push-delivery-sandbox fix)com.iterable:iterableapi3.6.3→3.9.0Swift Package Manager support:
ios/iterable_flutter/Package.swiftso the plugin can be consumed via SPM, alongside CocoaPods (Flutter falls back to CocoaPods when SPM is off).SwiftIterableFlutterPlugin→IterableFlutterPlugin(registration still bridges to+registerWithRegistrar:).Example app modernisation (required for the example to build under Flutter 3.44):
jcenter()).flutter_configwithflutter_dotenv(pure-Dart.envloader).Flutter derives the Swift package identity from the plugin's repository folder basename, which must match the Dart package name (
iterable_flutter). This repo is namediterable-flutter(hyphen), so SPM integration fails an identity check (unable to override package ... identity mismatch) until the repo is renamediterable-flutter→iterable_flutter. Proven by build tests across folder names.CocoaPods is entirely unaffected, so the SDK upgrades are usable now regardless. Because v0.8.0 ships
Package.swift, consumers should stay on CocoaPods until the rename, then adopt SPM.Test Evidence
Podfile.lock→Iterable-iOS-SDK (6.7.3)swift-sdk6.7.3app-debug.apk; manifest-blame →iterableapi:3.9.0NotificationParserTest)flutter test)How should this be manually tested? 🤓
cd example && flutter pub getcd ios && pod installthencd .. && flutter build ios --simulator --no-codesign→ builds;Podfile.lockshowsIterable-iOS-SDK (6.7.3).flutter build apk --debug→ builds; gradle resolvescom.iterable:iterableapi:3.9.0.flutter test→ 13/13 pass.iterable_flutter):flutter config --enable-swift-package-managerthenflutter build ios --simulator --no-codesign→ SwiftPM resolvesswift-sdk6.7.3.Any background context you want to provide? 🤗
iterable_flutteris abandoned; SpringCare maintains this fork.flutter_config(latest, 2.0.2) still references Flutter's removed v1Registrar, making it Android-incompatible.iterable-flutter→iterable_flutter(needed for SPM identity resolution).iterable_fluttergit dependency to the new repo URL +ref: 0.8.0.