-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathPackage.swift
More file actions
40 lines (39 loc) · 1.37 KB
/
Package.swift
File metadata and controls
40 lines (39 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "CTNotificationContent",
platforms: [
.iOS(.v10)
],
products: [
.library(
name: "CTNotificationContent",
targets: ["CTNotificationContentWrapper"])
],
dependencies: [
// SDWebImage is listed here so SPM resolves it as a single shared dependency.
// If another package in the app also adds SDWebImage with the same URL,
// SPM deduplicates it automatically — no conflicts.
.package(
url: "https://github.com/SDWebImage/SDWebImage.git",
from: "5.11.0"
),
],
targets: [
// The pre-built xcframework binary — cannot have dependencies itself.
.binaryTarget(
name: "CTNotificationContentBinary",
path: "Framework/CTNotificationContent.xcframework"
),
// Thin wrapper source target that re-exports the binary and pulls in SDWebImage.
// This is the standard SPM pattern for adding dependencies alongside a binaryTarget.
.target(
name: "CTNotificationContentWrapper",
dependencies: [
"CTNotificationContentBinary",
.product(name: "SDWebImage", package: "SDWebImage"),
],
path: "Sources/CTNotificationContentWrapper"
),
]
)