22// The swift-tools-version declares the minimum version of Swift required to build this package.
33
44import PackageDescription
5+ import Foundation
56
67let 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