publish: truePackage.swift as a DSL for your projects–It converts your package targets into a native Xcode project and targets. Swift Packages are our recommended way of declaring dependencies in your project. You can integrate them using:
Here we'll talk about the workflow where Tuist will read your Package.swift, and then generate a xcode project using XcodeProj.
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.
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?
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.