Docs

Local Dependencies

External Dependencies

Quote

Swift Packages are our recommended way of declaring dependencies in your project. You can integrate them using:

  1. Xcode’s default integration mechanism or
  2. using Tuist’s XcodeProj-based integration.

Tuist’s XcodeProj-based SPM integration

Here we’ll talk about the workflow where Tuist will read your Package.swift, and then generate a xcode project using XcodeProj.

Quote

The Package.swift file is just an interface to declare external dependencies, nothing else. That’s why you don’t define any targets or products in the package.

Limitations

WARNING

The aim of this feature is to provide an easy way for developers to assess the impact of adopting Tuist and Tuist Cloud in their Swift Packages. Therefore, we don’t plan to support the full range of Swift Package Manager features nor to bring every Tuist’s unique features like project description helpers to the packages world.

❓What are the limitations of Tuist’s built-in SPM integrations?

XCode’s Default SPM integration

If you want to use Xcode’s default integration mechanism, you can pass the list packages when instantiating a project:

let project = Project(name: "MyProject", packages: [
    .remote(url: "https://github.com/krzyzanowskim/CryptoSwift", requirement: .exact("1.8.0"))
])

And then reference them from your targets:

let target = .target(name: "MyTarget", dependencies: [
    .package(product: "CryptoSwift", type: .runtime)
])

For Swift Macros and Build Tool Plugins, you’ll need to use the types .macro and .plugin respectively.