Contents

Target

The basic building block of a Swift package.

Declaration

final class Target

Overview

Each target contains a set of source files that Swift Package Manager compiles into a module or test suite. You can vend targets to other packages by defining products that include the targets.

A target may depend on other targets within the same package and on products vended by the package’s dependencies.

Topics

Naming the Target

Configuring File Locations

Creating a Binary Target

Creating a System Library Target

Creating an Executable Target

Creating a Regular Target

Creating a Test Target

Creating a Plugin Target

Declaring a Dependency Target

Configuring the Target

Describing the Target Type

Type Methods

See Also

Configuring Targets