Skip to content

Translation 🌍

You can translate or improve the translation of this page.

Contribute

使用基于 XcodeProj 的软件包集成生成项目

在使用基于

XcodeProj 的集成时,您可以使用--replace-scm-with-registry

标志来解析注册表中的依赖项(如果有的话)。将其添加到Tuist.swift 文件中的installOptions

swift
import ProjectDescription

let tuist = Tuist(
    fullHandle: "{account-handle}/{project-handle}",
    project: .tuist(
        installOptions: .options(passthroughSwiftPackageManagerArguments: ["--replace-scm-with-registry"])
    )
)

如果要确保每次解析依赖关系时都使用注册表,则需要更新Tuist/Package.swift 文件中的依赖关系 ,以使用注册表标识符而不是 URL。注册表标识符的形式总是{organization}.{repository} 。例如,要使用swift-composable-architecture 软件包的注册表,请执行以下操作:

diff
dependencies: [
-   .package(url: "https://github.com/pointfreeco/swift-composable-architecture", from: "0.1.0")
+   .package(id: "pointfreeco.swift-composable-architecture", from: "0.1.0")
]

Released under the MIT License.