Editing
Editing
Section titled “Editing”Unlike traditional Xcode projects or Swift Packages,
where changes are done through Xcode’s UI,
Tuist-managed projects are defined in Swift code contained in manifest files.
If you’re familiar with Swift Packages and the Package.swift file,
the approach is very similar.
You could edit these files using any text editor,
but we recommend to use Tuist-provided workflow for that,
tuist edit.
The workflow creates an Xcode project that contains all manifest files and allows you to edit and compile them.
Thanks to using Xcode,
you get all the benefits of code completion, syntax highlighting, and error checking.
Edit the project
Section titled “Edit the project”To edit your project, you can run the following command in a Tuist project directory or a sub-directory:
tuist editThe command creates an Xcode project in a global directory and opens it in Xcode.
The project includes a Manifests directory that you can build to ensure all your manifests are valid.
Ignoring manifest files
Section titled “Ignoring manifest files”If your project contains Swift files with the same name as manifest files (e.g., Project.swift) in subdirectories that are not actual Tuist manifests, you can create a .tuistignore file at the root of your project to exclude them from the editing project.
The .tuistignore file uses glob patterns to specify which files should be ignored:
# Ignore all Project.swift files in the Sources directorySources/**/Project.swift
# Ignore specific subdirectoriesTests/Fixtures/**/Workspace.swiftThis is particularly useful when you have test fixtures or example code that happens to use the same naming convention as Tuist manifest files.
Edit and generate workflow
Section titled “Edit and generate workflow”As you might have noticed, the editing can’t be done from the generated Xcode project. That’s by design to prevent the generated project from having a dependency on Tuist, ensuring you can move from Tuist in the future with little effort.
When iterating on a project, we recommend running tuist edit from a terminal session to get an Xcode project to edit the project, and use another terminal session to run tuist generate.