There is no way to replace the SPM dependency for FirebaseAnalytics with FirebaseAnalyticsWithoutAdIdSupport as the first is added automatically by SPM because firebase_analytics describes that it depends on FirebaseAnalytics...
let package = Package(
name: "firebase_analytics",
platforms: [
.iOS("15.0"),
],
products: [
.library(name: "firebase-analytics", targets: ["firebase_analytics"]),
],
dependencies: [
.package(url: "https://github.com/firebase/firebase-ios-sdk", from: firebase_sdk_version),
.package(url: "https://github.com/firebase/flutterfire", exact: shared_spm_version),
],
targets: [
.target(
name: "firebase_analytics",
dependencies: [
.product(name: "FirebaseAnalytics", package: "firebase-ios-sdk"), <====
// Wrapper dependency
.product(name: "firebase-core-shared", package: "flutterfire"),
],
resources: [
.process("Resources"),
]
),
]
)
The native docs states that we should add the FirebaseAnalyticsWithoutAdIdSupport instead of the other one, but that is not how we do native deps in flutter... the package selects the native dependency...
I was migrating my project to SPM when stumbled on this, because it uses AnalyticsWithoutAdIdSupport... 😕
Until now, I was using cocoapods and the old documented way to change the platform dependency to FirebaseAnalyticsWithoutAdIdSupport...
But with SPM I am not seeing a way to do it.....
There is no way to replace the SPM dependency for
FirebaseAnalyticswithFirebaseAnalyticsWithoutAdIdSupportas the first is added automatically by SPM becausefirebase_analyticsdescribes that it depends onFirebaseAnalytics...The native docs states that we should add the
FirebaseAnalyticsWithoutAdIdSupportinstead of the other one, but that is not how we do native deps in flutter... the package selects the native dependency...I was migrating my project to SPM when stumbled on this, because it uses AnalyticsWithoutAdIdSupport... 😕
Until now, I was using cocoapods and the old documented way to change the platform dependency to
FirebaseAnalyticsWithoutAdIdSupport...But with SPM I am not seeing a way to do it.....