跳至內容

使用 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 檔案中的 dependencies,改用註冊表識別符而非 URL。

註冊表識別符號一律採用 {organization}.{repository} 格式。例如,若要為 swift-composable-architecture 套件使用註冊表,請執行以下操作:

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