-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPackage.swift
41 lines (38 loc) · 1.14 KB
/
Package.swift
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
41
// swift-tools-version:5.10
import PackageDescription
import Foundation
let useLocalRustXcframework = ProcessInfo.processInfo.environment["USE_LOCAL_RUST_XCFRAMEWORK"] == "1"
let yttriumXcframeworkTarget: Target = useLocalRustXcframework ?
.binaryTarget(
name: "YttriumXCFramework",
path: "target/ios/libuniffi_yttrium.xcframework"
) :
.binaryTarget(
name: "YttriumXCFramework",
url: "https://github.com/reown-com/yttrium/releases/download/0.8.15/libuniffi_yttrium.xcframework.zip",
checksum: "aedae8bc4829fdebc2deab350c7dc626bda48336e60d9bef8b6f15ae8a877f7a"
)
let package = Package(
name: "Yttrium",
platforms: [
.iOS(.v13), .macOS(.v12)
],
products: [
.library(
name: "Yttrium",
targets: ["Yttrium"]
),
],
targets: [
yttriumXcframeworkTarget,
.target(
name: "Yttrium",
dependencies: ["YttriumXCFramework"],
path: "platforms/swift/Sources/Yttrium",
publicHeadersPath: ".",
cSettings: [
.headerSearchPath(".")
]
)
]
)