Skip to content

Commit

Permalink
feat: Add NoLocation target to SPM (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
einsteinx2 authored Jun 2, 2023
1 parent 16b85bb commit 0bf2666
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
14 changes: 13 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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: "."),
]
)
1 change: 1 addition & 0 deletions SPM/mParticle-Google-Analytics-Firebase-GA4-NoLocation
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#import <Foundation/Foundation.h>
#if defined(__has_include) && __has_include(<mParticle_Apple_SDK/mParticle.h>)
#import <mParticle_Apple_SDK/mParticle.h>
#import <mParticle_Apple_SDK/mParticle.h>
#elif defined(__has_include) && __has_include(<mParticle_Apple_SDK_NoLocation/mParticle.h>)
#import <mParticle_Apple_SDK_NoLocation/mParticle.h>
#else
#import "mParticle.h"
#import "mParticle.h"
#endif

@interface MPKitFirebaseGA4Analytics : NSObject <MPKitProtocol>
Expand Down

0 comments on commit 0bf2666

Please sign in to comment.