Summary
Since v5.7.0 the plugin can be integrated on iOS via Swift Package Manager, but Google On-Device Measurement (ODM) is not reachable through that path. The plugin's Package.swift only pulls the AdjustSdk product, and the official ODM guide for Flutter is CocoaPods-only — so apps that use ODM in production cannot move to SPM.
This matters beyond a nice-to-have: Flutter has no per-plugin opt-out for SPM. Once any other dependency in the app requires SPM (Adapty 4.x is SPM-only, Firebase and Sentry are heading the same way), enabling flutter config --enable-swift-package-manager is all-or-nothing — and at that moment ODM silently becomes unavailable.
Current state (as of v5.8.0)
Plugin — ios/adjust_sdk/Package.swift declares a single product:
.target(
name: "adjust_sdk",
dependencies: [
.product(name: "AdjustSdk", package: "ios_sdk"),
],
...
)
Native iOS SDK — Package.swift does expose the ODM product:
products: [
.library(name: "AdjustSdk", targets: ["AdjustSdk"]),
.library(name: "AdjustUnsigned", targets: ["AdjustUnsigned"]),
.library(name: "AdjustWebBridge", targets: ["AdjustWebBridge", "AdjustSdk"]),
.library(name: "AdjustGoogleOdm", targets: ["AdjustGoogleOdm", "AdjustSdk"])
],
So the capability exists in ios_sdk; it just isn't wired up in the Flutter plugin.
The official Flutter ODM guide documents only the CocoaPods route:
pod 'Adjust/AdjustGoogleOdm'
pod 'GoogleAdsOnDeviceConversion', '3.0.0'
It makes no mention of SPM.
Why the CocoaPods workaround doesn't survive SPM
Keeping pod 'Adjust/AdjustGoogleOdm' in the Podfile while the plugin comes in via SPM pulls the Adjust SDK through two package managers at once: the AdjustGoogleOdm subspec depends on Adjust/Adjust, which depends on AdjustSignature 5.0.0, while SPM independently builds AdjustSdk + its adjust_signature_sdk dependency. The iOS build then fails with:
Multiple commands produce '.../AdjustSigSdk.framework'
It is also not a matter of dropping the pod sources into the SPM build by hand: Adjust.podspec points the ODM subspec at plugins/odm/sources/cocoapods/*, while the SPM target uses plugins/odm/sources/spm. The two integrations have different sources, so the fix has to come from the plugin side.
Request
Expose the ODM integration to SPM users of the Flutter plugin. Some options, in the order we'd find useful:
- Opt-in product / companion plugin — e.g. a separate
adjust_sdk_google_odm Flutter plugin (or an additional SPM product) that depends on .product(name: "AdjustGoogleOdm", package: "ios_sdk"), mirroring how the CocoaPods subspec keeps ODM opt-in. This keeps the GoogleAdsOnDeviceConversion dependency off the apps that don't use ODM.
- Documentation — at minimum, an SPM section in the Google ODM guide describing a supported way to combine the two, if one already exists that we've missed.
If option 1 is the direction, we're happy to test a branch against a production app that runs ODM today.
Environment
adjust_sdk: 5.7.1 / 5.8.0
- Flutter: 3.44.1
- Xcode 26,
IPHONEOS_DEPLOYMENT_TARGET = 15.0
- ODM enabled in production via
pod 'Adjust/AdjustGoogleOdm'
Related: #189 added generic SPM support, which is what surfaced this gap.
Summary
Since
v5.7.0the plugin can be integrated on iOS via Swift Package Manager, but Google On-Device Measurement (ODM) is not reachable through that path. The plugin'sPackage.swiftonly pulls theAdjustSdkproduct, and the official ODM guide for Flutter is CocoaPods-only — so apps that use ODM in production cannot move to SPM.This matters beyond a nice-to-have: Flutter has no per-plugin opt-out for SPM. Once any other dependency in the app requires SPM (Adapty 4.x is SPM-only, Firebase and Sentry are heading the same way), enabling
flutter config --enable-swift-package-manageris all-or-nothing — and at that moment ODM silently becomes unavailable.Current state (as of
v5.8.0)Plugin —
ios/adjust_sdk/Package.swiftdeclares a single product:Native iOS SDK —
Package.swiftdoes expose the ODM product:So the capability exists in
ios_sdk; it just isn't wired up in the Flutter plugin.The official Flutter ODM guide documents only the CocoaPods route:
It makes no mention of SPM.
Why the CocoaPods workaround doesn't survive SPM
Keeping
pod 'Adjust/AdjustGoogleOdm'in thePodfilewhile the plugin comes in via SPM pulls the Adjust SDK through two package managers at once: theAdjustGoogleOdmsubspec depends onAdjust/Adjust, which depends onAdjustSignature 5.0.0, while SPM independently buildsAdjustSdk+ itsadjust_signature_sdkdependency. The iOS build then fails with:It is also not a matter of dropping the pod sources into the SPM build by hand:
Adjust.podspecpoints the ODM subspec atplugins/odm/sources/cocoapods/*, while the SPM target usesplugins/odm/sources/spm. The two integrations have different sources, so the fix has to come from the plugin side.Request
Expose the ODM integration to SPM users of the Flutter plugin. Some options, in the order we'd find useful:
adjust_sdk_google_odmFlutter plugin (or an additional SPM product) that depends on.product(name: "AdjustGoogleOdm", package: "ios_sdk"), mirroring how the CocoaPods subspec keeps ODM opt-in. This keeps theGoogleAdsOnDeviceConversiondependency off the apps that don't use ODM.If option 1 is the direction, we're happy to test a branch against a production app that runs ODM today.
Environment
adjust_sdk: 5.7.1 / 5.8.0IPHONEOS_DEPLOYMENT_TARGET = 15.0pod 'Adjust/AdjustGoogleOdm'Related: #189 added generic SPM support, which is what surfaced this gap.