Enumeration

Target.Dependency

The different types of a target’s dependency on another entity.

Declaration

enum Target.Dependency

Topics

Creating a Target Dependency

static func product(name: String, package: String?) -> Target.Dependency

Creates a dependency on a product from a package dependency.

static func target(name: String) -> Target.Dependency

Creates a dependency on a target in the same package.

static func byName(name: String) -> Target.Dependency

Creates a by-name dependency that resolves to either a target or a product but after the package graph has been loaded.

init(stringLiteral: String)

Creates a target dependency instance with the given value.

init(extendedGraphemeClusterLiteral: String)

Creates an instance initialized to the given value.

init(unicodeScalarLiteral: String)

Creates an instance initialized to the given value.

Encoding and Decoding

func encode(to: Encoder)

Encodes this value into the given encoder.

Relationships

See Also

Declaring a Target Dependency

var dependencies: [Target.Dependency]

The target’s dependencies on other entities inside or outside the package.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software