# 使用 Xcode 套件整合生成嘅項目 {#generated-project-with-xcode-based-integration}

如果你喺 Tuist 項目中使用套件嘅 <.localized_link href="/guides/features/projects/dependencies#xcodes-default-integration">Xcode 預設整合</.localized_link>，喺新增套件時需要使用註冊表識別符而非 URL：
```swift
import ProjectDescription

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

> [!TIP]
> 你唔需要為每個套件都使用註冊表識別符。喺項目生成後執行 `tuist registry setup`，亦會設定 Xcode 從註冊表解析以原始碼控制 URL 宣告嘅套件，而 `registryEnabled` 本身並唔會咁做。請參閱 <.localized_link href="/guides/features/package-registries/swift/xcode-project#resolving-source-control-packages">解析原始碼控制套件</.localized_link>。
