Docs
- Dependencies | Tuist
- Use Tuist with a Swift Package | Tuist
- Tuist supports using
Package.swift
as a DSL for your projects–It converts your package targets into a native Xcode project and targets.
- Tuist supports using
Local Dependencies
External Dependencies
Quote
Swift Packages are our recommended way of declaring dependencies in your project. You can integrate them using:
- Xcode’s default integration mechanism or
- 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:
And then reference them from your targets:
For Swift Macros and Build Tool Plugins, you’ll need to use the types .macro
and .plugin
respectively.