-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missin SPM Integration #29
Comments
Hey! Yes, we would like that. Should I contact my account manager? or will you read this request as well? |
@RolandasRazma what worked for us is to simply take the 4 (2 headers, 2 source) files from this repo and add them to your project manually - just make sure not to forget the bridging header. I hope you're not waiting for Segment to add SPM support because by the looks of it, they're not maintaining this at all. |
There's already a fork with a good looking Package.swift file: https://github.com/dotswift/analytics-ios-integration-adjust I constructed somewhat similar file, keeping the target & product name in sync with an https://github.com/Appboy/appboy-segment-ios integration: // swift-tools-version: 5.6
import PackageDescription
let package = Package(
name: "Segment-Adjust",
defaultLocalization: "en",
platforms: [
.iOS(.v12)
],
products: [
.library(name: "AdjustSegment", targets: ["AdjustSegment"])
],
dependencies: [
.package(url: "https://github.com/segmentio/analytics-ios.git", from: "4.1.0"),
.package(url: "https://github.com/adjust/ios_sdk.git", from: "4.29.3")
],
targets: [
.target(
name: "AdjustSegment",
dependencies: [
.product(name: "Segment", package: "analytics-ios"),
.product(name: "Adjust", package: "ios_sdk")
],
path: "Pod/",
sources: ["Classes"],
publicHeadersPath: "Classes",
cSettings: [
.headerSearchPath("Classes")
],
linkerSettings: [
.unsafeFlags(["-ObjC"])
]
)
]
) Unfortunately I had to add an unsafe .package(url: "<URL>/analytics-ios-integration-adjust.git", branch: "spm") // OK
.package(name: "analytics-ios-integration-adjust", path: "../<DIR>") // OK
.package(url: "<URL>/analytics-ios-integration-adjust.git", from: "<VERSION>") // the target 'AdjustSegment' in project 'AdjustSegment' contains unsafe build flags |
Would be nice to have SPM Integration
The text was updated successfully, but these errors were encountered: