使用 XcodeProj 基礎套件整合生成專案
當使用 XcodeProj 基礎整合 時,你可以使用 --replace-scm-with-registry 旗標從 Registry 解析依賴項(如果可用)。將它加入到你 Tuist.swift 檔案中嘅 installOptions:
swift
import ProjectDescription
let tuist = Tuist(
fullHandle: "{account-handle}/{project-handle}",
project: .tuist(
installOptions: .options(passthroughSwiftPackageManagerArguments: ["--replace-scm-with-registry"])
)
)
如果你想確保每次解析依賴項時都使用 Registry,你需要更新 Tuist/Package.swift 檔案中嘅 dependencies,改用 Registry 識別符而非 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")
]