Hen*_*bat 10 xcode swift swift-package-manager
我有与 SPM 一起安装的 SDK。它在 Xcode 13.2 上按预期工作,但在 Xcode 13.3 上我收到此错误。
import PackageDescription
let package = Package(
name: "AAA",
products: [
.library(
name: "AAA",
targets: ["AAA"]),
],
dependencies: [
],
targets: [
.binaryTarget(
name: "AAA",
path: "artifacts/BBB.xcframework"
),
.testTarget(
name: "AAATests",
dependencies: ["AAA"]),
]
Run Code Online (Sandbox Code Playgroud)
Ori*_*Ori 18
工件名称必须与目标名称匹配(这是 Xcode 13.3 的新功能)。由于您的工件名称是 BBB.xcframework,因此下面的示例应该适合您:
let package = Package(
name: "BBB",
products: [
.library(
name: "BBB",
targets: ["BBB"]),
],
dependencies: [
],
targets: [
.binaryTarget(
name: "BBB",
path: "artifacts/BBB.xcframework"
),
]
)
Run Code Online (Sandbox Code Playgroud)