My Package.swift
looks something like
let package = Package(
name: "MyPackage",
platforms: [
.iOS(.v13)
],
products: [
.library(
name: "MyPackage",
targets: ["MyPackage"])
],
dependencies: [
.package(url: "https://github.com/SnapKit/SnapKit.git", from: "5.0.0"),
],
targets: [
.target(
name: "MyPackage",
dependencies: [
"SnapKit",
]),
.testTarget(
name: "MyPackageTests",
dependencies: ["MyPackage"])
]
)
When I run swift test
I get
error: the library 'MyPackage' requires macos 10.10, but depends on the product 'SnapKit'
which requires macos 10.12; consider changing the library 'SurfUIKit' to require macos 10.12
or later, or the product 'SnapKit' to require macos 10.10 or earlier.
Why is swift running tests for macos that is not listed as a supported platform? Can I get swift to run the tests for iOS, ideally specifying some version target? What alternative do I have using xcode in the CLI?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…