Skip to content

STRUCT

Workspace

Contents

  • Properties
    • name
    • projects
    • schemes
    • fileHeaderTemplate
    • additionalFiles
    • generationOptions
  • Methods
    • init(name:projects:schemes:fileHeaderTemplate:additionalFiles:generationOptions:)
swift
public struct Workspace: Codable, Equatable, Sendable

A workspace representation.

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:

swift
import ProjectDescription

let workspace = Workspace(
    name: "Workspace",
    projects: ["Projects/**"]
)

Properties

name

swift
public let name: String

The name of the workspace. Also, the file name of the generated Xcode workspace.

projects

swift
public let projects: [Path]

The paths (or glob patterns) to manifest projects.

schemes

swift
public let schemes: [Scheme]

The custom schemes for the workspace. Default schemes for each target are generated by default.

fileHeaderTemplate

swift
public let fileHeaderTemplate: FileHeaderTemplate?

The custom file header template for Xcode built-in file templates.

additionalFiles

swift
public let additionalFiles: [FileElement]

The additional files for the workspace. For project's additional files, see Project/additionalFiles.

generationOptions

swift
public let generationOptions: GenerationOptions

The generation configuration of the workspace.

Methods

init(name:projects:schemes:fileHeaderTemplate:additionalFiles:generationOptions:)

swift
public init(
    name: String,
    projects: [Path],
    schemes: [Scheme] = [],
    fileHeaderTemplate: FileHeaderTemplate? = nil,
    additionalFiles: [FileElement] = [],
    generationOptions: GenerationOptions = .options()
)

Released under the MIT License.