diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..23ae21b --- /dev/null +++ b/Package.swift @@ -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"), + ] +) diff --git a/Pod/Classes/SEGAmplitudeIntegration.h b/Pod/Classes/SEGAmplitudeIntegration.h index 15df4e1..2ebebf9 100644 --- a/Pod/Classes/SEGAmplitudeIntegration.h +++ b/Pod/Classes/SEGAmplitudeIntegration.h @@ -14,8 +14,10 @@ #import #elif defined(__has_include) && __has_include() #import -#else +#elif defined(__has_include) && __has_include() #import +#else +#import "Amplitude.h" #endif typedef void(^SEGAmplitudeSetupBlock)(Amplitude *amplitude);