我正在尝试使用xCode11 beta 7构建swift包并使用外部依赖(CoreStore)。 我的包面向iOS11+,在Package.swift
中声明:
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Storages",
platforms: [.iOS(.v11)],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Storages",
targets: ["Storages"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/JohnEstropia/CoreStore.git", from: "6.3.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Storages",
dependencies: [.product(name: "CoreStore")]),
.testTarget(
name: "StoragesTests",
dependencies: ["Storages"]),
]
)
然而,当我构建它时,依赖项将没有指定iOS版本进行构建,因此我会收到兼容性错误:"'uniquenessConstraints' 仅在 iOS 9.0 或更高版本可用"
等等。
我该怎么解决呢?看起来像是xCode11的一个bug,但我不确定。