Contents

build(_:parameters:)

Performs a build of all, or a subset, of products and targets in a package.

Declaration

func build(_ subset: PackageManager.BuildSubset, parameters: PackageManager.BuildParameters) throws -> PackageManager.BuildResult

Parameters

  • subset:

    The subset of targets to build.

  • parameters:

    The build parameters to apply.

Return Value

The build results.

Discussion

Return any errors encountered during the build in the build result, as well as the log of the build commands that it runs. This method throws an error if the input parameters are invalid, or in case the build can’t be started.

The Swift package manager command line interface or any IDE that supports packages may show the progress of the build as it happens.

See Also

Building a Package