Skip to content

Commit

Permalink
Merge pull request #105 from mcostasilva/master
Browse files Browse the repository at this point in the history
Add SPM Support
  • Loading branch information
bsneed authored Feb 16, 2022
2 parents 3597947 + 88263b0 commit c4fd573
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
26 changes: 26 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

let package = Package(
name: "Segment_Amplitude",
platforms: [
.iOS(.v10),
.tvOS(.v9),
.macOS(.v10_10)
],
products: [
.library(name: "Segment_Amplitude", targets: ["Segment_Amplitude"]),
],
dependencies: [
.package(name: "Amplitude", url: "https://github.com/amplitude/Amplitude-iOS", .upToNextMinor(from: "8.3.1")),
.package(name: "Segment", url: "https://github.com/segmentio/analytics-ios", .upToNextMinor(from: "4.1.4"))
],
targets: [
.target(
name: "Segment_Amplitude",
dependencies: ["Amplitude", "Segment"],
path: "Pod",
publicHeadersPath: "Classes"),
]
)
4 changes: 3 additions & 1 deletion Pod/Classes/SEGAmplitudeIntegration.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
#import <Amplitude_iOS/Amplitude.h>
#elif defined(__has_include) && __has_include(<Amplitude-iOS/Amplitude.h>)
#import <Amplitude-iOS/Amplitude.h>
#else
#elif defined(__has_include) && __has_include(<Amplitude/Amplitude.h>)
#import <Amplitude/Amplitude.h>
#else
#import "Amplitude.h"
#endif

typedef void(^SEGAmplitudeSetupBlock)(Amplitude *amplitude);
Expand Down

0 comments on commit c4fd573

Please sign in to comment.