我有一个项目,我想在我的应用程序中使用这个包。我用谷歌搜索并按照说明进行操作:
//in Terminal
? mkdir SGLMath
? cd SGLMath
? swift package init --type executable
然后我打开package.swift
文件并更改为:
// swift-tools-version:3.1
import PackageDescription
let package = Package(
name: "SGLMath",
dependencies: [
.Package(url: "https://github.com/SwiftGL/Math.git", majorVersion: 1)
]
)
然后Terminal
:
? swift package fetch
然后我得到了这个错误:
错误:包的布局不受支持,发现意外的源文件:/Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/EqualWithAccuracy.swift, /Users/xuanxi/SGLMath/.build /checkouts/Math.git-9167533630816302265/Tests/FunctionsTests.swift, /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/Matrix2x2Tests.swift, /Users/xuanxi/SGLMath/.build/checkouts /Math.git-9167533630816302265/Tests/Matrix3x3Tests.swift, /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/Matrix4x4Tests.swift, /Users/xuanxi/SGLMath/.build/checkouts/Math .git-9167533630816302265/Tests/SwizzleTests.swift, /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/Vector2Tests.swift, /Users/xuanxi/SGLMath/.build/checkouts/Math.git -9167533630816302265/Tests/Vector4Tests。迅速,/Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/glmMatrixTests.swift
修复:在模块内移动文件
我该如何解决这个问题?
- 如果我想将此包添加到我现有的
Xcode
项目中怎么办?