From 0bf266622940847ed097e0fdbe9578e14663d34c Mon Sep 17 00:00:00 2001 From: Ben Baron Date: Fri, 2 Jun 2023 14:21:42 -0700 Subject: [PATCH] feat: Add NoLocation target to SPM (#19) --- Package.swift | 14 +++++++++++++- ...rticle-Google-Analytics-Firebase-GA4-NoLocation | 1 + .../MPKitFirebaseGA4Analytics.h | 6 ++++-- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 120000 SPM/mParticle-Google-Analytics-Firebase-GA4-NoLocation diff --git a/Package.swift b/Package.swift index 31dce8b..98dc93c 100644 --- a/Package.swift +++ b/Package.swift @@ -10,6 +10,9 @@ let package = Package( .library( name: "mParticle-Google-Analytics-Firebase-GA4", targets: ["mParticle-Google-Analytics-Firebase-GA4"]), + .library( + name: "mParticle-Google-Analytics-Firebase-GA4-NoLocation", + targets: ["mParticle-Google-Analytics-Firebase-GA4-NoLocation"]) ], dependencies: [ .package(name: "mParticle-Apple-SDK", @@ -23,11 +26,20 @@ let package = Package( .target( name: "mParticle-Google-Analytics-Firebase-GA4", dependencies: [ - .byName(name: "mParticle-Apple-SDK"), + .product(name: "mParticle-Apple-SDK", package: "mParticle-Apple-SDK"), .product(name: "FirebaseAnalytics", package: "Firebase"), ], path: "mParticle-Google-Analytics-Firebase-GA4", exclude: ["Info.plist", "dummy.swift"], publicHeadersPath: "."), + .target( + name: "mParticle-Google-Analytics-Firebase-GA4-NoLocation", + dependencies: [ + .product(name: "mParticle-Apple-SDK-NoLocation", package: "mParticle-Apple-SDK"), + .product(name: "FirebaseAnalytics", package: "Firebase"), + ], + path: "SPM/mParticle-Google-Analytics-Firebase-GA4-NoLocation", + exclude: ["Info.plist", "dummy.swift"], + publicHeadersPath: "."), ] ) diff --git a/SPM/mParticle-Google-Analytics-Firebase-GA4-NoLocation b/SPM/mParticle-Google-Analytics-Firebase-GA4-NoLocation new file mode 120000 index 0000000..7d1e195 --- /dev/null +++ b/SPM/mParticle-Google-Analytics-Firebase-GA4-NoLocation @@ -0,0 +1 @@ +../mParticle-Google-Analytics-Firebase-GA4 \ No newline at end of file diff --git a/mParticle-Google-Analytics-Firebase-GA4/MPKitFirebaseGA4Analytics.h b/mParticle-Google-Analytics-Firebase-GA4/MPKitFirebaseGA4Analytics.h index 5f810e0..e39fc18 100755 --- a/mParticle-Google-Analytics-Firebase-GA4/MPKitFirebaseGA4Analytics.h +++ b/mParticle-Google-Analytics-Firebase-GA4/MPKitFirebaseGA4Analytics.h @@ -1,8 +1,10 @@ #import #if defined(__has_include) && __has_include() -#import + #import +#elif defined(__has_include) && __has_include() + #import #else -#import "mParticle.h" + #import "mParticle.h" #endif @interface MPKitFirebaseGA4Analytics : NSObject