Back to Tuist

使用 Xcode 套件整合產生專案{#generated-project-with-xcode-based-integration}

server/priv/docs/zh_Hant/guides/features/registry/generated-project.md

4.191.8944 B
Original Source

使用 Xcode 套件整合產生專案{#generated-project-with-xcode-based-integration}

如果您正在使用 <LocalizedLink href="/guides/features/projects/dependencies#xcodes-default-integration">Xcode 的預設套件與 Tuist Projects 整合</LocalizedLink>,則在新增套件時,您需要使用註冊表識別符,而非 URL:

swift
import ProjectDescription

let project = Project(
    name: "MyProject",
    packages: [
        // Source control resolution
        // .package(url: "https://github.com/pointfreeco/swift-composable-architecture", from: "0.1.0")
        // Registry resolution
        .package(id: "pointfreeco.swift-composable-architecture", from: "0.1.0")
    ],
    targets: [
        .target(
            name: "App",
            product: .app,
            bundleId: "dev.tuist.App",
            dependencies: [
                .package(product: "ComposableArchitecture"),
            ]
        )
    ]
)