Usage

Dependencies

Examples

Building at scale

Commands

Contributors

Workspace description

By default, tuist generate generates an Xcode workspace that has the same name as the current project. It includes the project and all its dependencies. Tuist allows customizing this behaviour by defining a workspace manifest within a Workspace.swift file. Workspace manifests allow specifying a list of projects to generate and include in an Xcode workspace. Those projects don’t necessarily have to depend on one another. Additionally, files and folder references (such as documentation files) can be included in a workspace manifest.

The snippet below shows an example workspace manifest:

import ProjectDescription
let workspace = Workspace(name: "CustomWorkspace",
projects: [
"App",
"Modules/**"
],
schemes: [
Scheme(name: "Workspace-App",
shared: true,
buildAction: BuildAction(targets: [.project(path: "App", target: "App")], preActions: []),
testAction: TestAction(targets: [TestableTarget(target: .project(path: "App", target: "AppTests"))]),
runAction: RunAction(executable: .project(path: "App", target: "App")),
archiveAction: ArchiveAction(configurationName: "Debug", customArchiveName: "Something2"))
],
additionalFiles: [
"Documentation/**",
.folderReference(path: "Website")
])
Copy the content

Although Workspace.swift file can reside in any directory (including a project directory), we recommend defining it at the root of the project:

Tuist
A global Tuist's directory.
Workspace.swift
Workspace manifest file.
Projects
A directory that contains all the projects.
App
A contains the app project.
Project.swift
The app's project manifest file.

Workspace

A Workspace.swift should initialize a variable of type Workspace. It can take any name, although we recommend to stick to workspace. A workspace accepts the following attributes:

PropertyDescriptionTypeOptionalDefault
Name

Name of the workspace. It’s used to determine the name of the generated Xcode workspace.

Type: String
Optional: No
Default value:

Name of the workspace. It’s used to determine the name of the generated Xcode workspace.

StringNo
Projects

List of paths (or glob patterns) to projects to generate and include within the generated Xcode workspace.

Type: [Path]
Optional: No
Default value:

List of paths (or glob patterns) to projects to generate and include within the generated Xcode workspace.

[Path]No
Schemes

List of custom schemes to include in the workspace

Type: [Scheme]
Optional: Yes
Default value: []

List of custom schemes to include in the workspace

[Scheme]Yes[]
AdditionalFiles

List of files to include in the workspace - these won't be included in any of the projects or their build phases.

Optional: Yes
Default value: []

List of files to include in the workspace - these won't be included in any of the projects or their build phases.

[FileElement]Yes[]

By using this website, you agree to our cookie policy.