Skip to content

Commit 4d9f5d7

Browse files
author
Harald
committed
Adopt names for xcode usage
1 parent ea89342 commit 4d9f5d7

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

Package.swift

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,31 @@
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
5+
import Foundation
56

67
let package = Package(
78
name: "ObjectBox",
89

910
products: [
1011
.plugin(name: "GeneratorCommand", targets: ["GeneratorCommand"]),
11-
.library(name: "ObjectBox", targets: ["ObjectBox"]),
12+
.library(
13+
name: "ObjectBox.xcframework", targets: ["ObjectBox.xcframework"]
14+
),
1215
],
1316
targets: [
1417

1518
/// MARK: - Binary dependencies
1619
.binaryTarget(
1720
name: "ObjectBoxGenerator",
1821
url:
19-
"https://github.com/objectbox/objectbox-swift-spec-staging/releases/download/v1.3.x/ObjectBoxGenerator.artifactbundle.zip",
22+
"https://github.com/objectbox/objectbox-swift-spec-staging/releases/download/SPM-preview1/ObjectBoxGenerator.artifactbundle.zip",
2023
checksum: "62d3e8d9e7141ef75462c8f8f08e6334def0b80f946053550ff7c6789c3187f9"
2124
),
2225
.binaryTarget(
23-
name: "ObjectBox",
26+
name: "ObjectBox.xcframework",
2427
url:
25-
"https://github.com/objectbox/objectbox-swift-spec-staging/releases/download/v1.3.x/ObjectBox.xcframework.zip",
26-
checksum: "b680d60d598f818d5f077eebbe0584bd38b723c982133bc186ffe18bf6364eb2"
28+
"https://github.com/objectbox/objectbox-swift-spec-staging/releases/download/SPM-preview1/ObjectBox.xcframework.zip",
29+
checksum: "3222f5d3eec6f91a1d47f3a7acfec47c99bd7b2eeec27948fddd58bb8a9dd18e"
2730
),
2831

2932
/// MARK: - Plugin implementations
@@ -46,3 +49,21 @@ let package = Package(
4649

4750
]
4851
)
52+
53+
// TODO, we need to be able to switch between CI and release in the URL, but keep the checksum the same
54+
// additionally, having an option for local development could also be handy
55+
// see if this, or any other way could be used ...
56+
// enum BinarySource {
57+
// case local, staging, release
58+
59+
// init() {
60+
// if getenv("OBX_SPM_LOCAL_BINARIES") != nil {
61+
// self = .local
62+
// } else if getenv("OBX_SPM_STAGING_BINARIES") != nil {
63+
// self = .staging
64+
// } else {
65+
// self = .release
66+
// }
67+
// }
68+
// }
69+

0 commit comments

Comments
 (0)