byName(name:condition:)

Creates a dependency that resolves to either a target or a product with the specified name.

Target.swift:1354
SwiftPM
5.3+
static func byName(name: String, condition: TargetDependencyCondition? = nil) -> Target.Dependency

Parameters

name

The name of the dependency, either a target or a product.

condition

A condition that limits the application of the target dependency. For example, only apply a dependency for a specific platform.

Returns

A Target.Dependency instance.

Swift Package Manager creates the by-name dependency after it has loaded the package graph.