Skip to content

Commit

Permalink
feat: Add NoLocation target to SPM (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
einsteinx2 authored Jun 2, 2023
1 parent 2a26c68 commit 5a3028e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
16 changes: 15 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ let package = Package(
.library(
name: "mParticle-Appboy",
targets: ["mParticle-Appboy"]),
.library(
name: "mParticle-Appboy-NoLocation",
targets: ["mParticle-Appboy-NoLocation"]
)
],
dependencies: [
.package(name: "mParticle-Apple-SDK",
Expand All @@ -23,11 +27,21 @@ let package = Package(
.target(
name: "mParticle-Appboy",
dependencies: [
.byName(name: "mParticle-Apple-SDK"),
.product(name: "mParticle-Apple-SDK", package: "mParticle-Apple-SDK"),
.product(name: "BrazeUI", package: "braze-swift-sdk", condition: .when(platforms: [.iOS])),
.product(name: "BrazeKit", package: "braze-swift-sdk"),
.product(name: "BrazeKitCompat", package: "braze-swift-sdk"),
]
),
.target(
name: "mParticle-Appboy-NoLocation",
dependencies: [
.product(name: "mParticle-Apple-SDK-NoLocation", package: "mParticle-Apple-SDK"),
.product(name: "BrazeUI", package: "braze-swift-sdk", condition: .when(platforms: [.iOS])),
.product(name: "BrazeKit", package: "braze-swift-sdk"),
.product(name: "BrazeKitCompat", package: "braze-swift-sdk"),
],
path: "SPM/mParticle-Appboy-NoLocation"
)
]
)
1 change: 1 addition & 0 deletions SPM/mParticle-Appboy-NoLocation
6 changes: 4 additions & 2 deletions Sources/mParticle-Appboy/include/MPKitAppboy.h
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 MPKitAppboy : NSObject <MPKitProtocol>
Expand Down
6 changes: 4 additions & 2 deletions Sources/mParticle-Appboy/include/mParticle_Appboy.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ FOUNDATION_EXPORT const unsigned char mParticle_AppboyVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <mParticle_Appboy/PublicHeader.h>

#if defined(__has_include) && __has_include(<mParticle_Appboy/MPKitAppboy.h>)
#import <mParticle_Appboy/MPKitAppboy.h>
#import <mParticle_Appboy/MPKitAppboy.h>
#elif defined(__has_include) && __has_include(<mParticle_Appboy_NoLocation/MPKitAppboy.h>)
#import <mParticle_Appboy_NoLocation/MPKitAppboy.h>
#else
#import "MPKitAppboy.h"
#import "MPKitAppboy.h"
#endif

0 comments on commit 5a3028e

Please sign in to comment.