Revert Package changes, try the when conditional that doesnt seem to do what we need

This commit is contained in:
Jackson Harper 2023-09-19 18:09:12 +08:00
parent 8a5372fd63
commit b714fe1f94
2 changed files with 25 additions and 8 deletions

View file

@ -144,6 +144,15 @@
"version" : "2.6.0"
}
},
{
"identity" : "posthog-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/PostHog/posthog-ios.git",
"state" : {
"revision" : "3a6afc24d6bde730a19470d4e6b713f44d076ad9",
"version" : "2.0.3"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
@ -153,6 +162,15 @@
"version" : "2.1.0"
}
},
{
"identity" : "pspdfkit-sp",
"kind" : "remoteSourceControl",
"location" : "https://github.com/PSPDFKit/PSPDFKit-SP",
"state" : {
"revision" : "f4ba9790488b8f11c29cff35943e430efcdb8003",
"version" : "12.0.1"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",

View file

@ -46,9 +46,9 @@ let package = Package(
.testTarget(name: "ModelsTests", dependencies: ["Models"]),
.target(
name: "Utils",
// dependencies: [
// .product(name: "PostHog", package: "posthog-ios")
// ],
dependencies: [
.product(name: "PostHog", package: "posthog-ios", condition: .when(platforms: [.iOS]))
],
resources: [.process("Resources")]
),
.testTarget(name: "UtilsTests", dependencies: ["Utils"])
@ -58,7 +58,7 @@ let package = Package(
var appPackageDependencies: [Target.Dependency] {
var deps: [Target.Dependency] = ["Views", "Services", "Models", "Utils"]
// Comment out following line for macOS build
// deps.append(.product(name: "PSPDFKit", package: "PSPDFKit-SP"))
deps.append(.product(name: "PSPDFKit", package: "PSPDFKit-SP", condition: .when(platforms: [.iOS])))
return deps
}
@ -69,11 +69,10 @@ var dependencies: [Package.Dependency] {
.package(url: "https://github.com/siteline/SwiftUI-Introspect.git", from: "0.1.4"),
.package(url: "https://github.com/google/GoogleSignIn-iOS", from: "6.2.2"),
.package(url: "https://github.com/gonzalezreal/swift-markdown-ui", from: "2.0.0"),
.package(url: "https://github.com/exyte/PopupView.git", from: "2.6.0")
// ,
// .package(url: "https://github.com/PostHog/posthog-ios.git", from: "2.0.0")
.package(url: "https://github.com/exyte/PopupView.git", from: "2.6.0"),
.package(url: "https://github.com/PostHog/posthog-ios.git", from: "2.0.0")
]
// Comment out following line for macOS build
// deps.append(.package(url: "https://github.com/PSPDFKit/PSPDFKit-SP", from: "12.0.1"))
deps.append(.package(url: "https://github.com/PSPDFKit/PSPDFKit-SP", from: "12.0.1"))
return deps
}