Português (Portuguese)
Português (Portuguese)
Appearance
Português (Portuguese)
Português (Portuguese)
Appearance
ENUM
TargetDependency
Contents
target(name:status:condition:)
macro(name:)
project(target:path:status:condition:)
framework(path:status:condition:)
library(path:publicHeaders:swiftModuleMap:condition:)
package(product:type:condition:)
sdk(name:type:status:condition:)
xcframework(path:expectedSignature:status:condition:)
xctest
external(name:condition:)
typeName
sdk(name:type:condition:)
target(_:condition:)
public enum TargetDependency: Codable, Hashable, Sendable
A target dependency.
target(name:status:condition:)
case target(name: String, status: LinkingStatus = .required, condition: PlatformCondition? = nil)
Dependency on another target within the same project
nil
if this should always be usedmacro(name:)
case macro(name: String)
Dependency on a macro target within the same project
project(target:path:status:condition:)
case project(target: String, path: Path, status: LinkingStatus = .required, condition: PlatformCondition? = nil)
Dependency on a target within another project
nil
if this should always be usedframework(path:status:condition:)
case framework(path: Path, status: LinkingStatus = .required, condition: PlatformCondition? = nil)
Dependency on a prebuilt framework
nil
if this should always be usedlibrary(path:publicHeaders:swiftModuleMap:condition:)
case library(path: Path, publicHeaders: Path, swiftModuleMap: Path?, condition: PlatformCondition? = nil)
Dependency on prebuilt library
nil
if this should always be usedpackage(product:type:condition:)
case package(product: String, type: PackageType = .runtime, condition: PlatformCondition? = nil)
Dependency on a swift package manager product using Xcode native integration. It's recommended to use external
instead. For more info, check the external dependencies documentation .
nil
if this should always be usedsdk(name:type:status:condition:)
case sdk(name: String, type: SDKType, status: LinkingStatus, condition: PlatformCondition? = nil)
Dependency on system library or framework
ARKit
, c++
nil
if this should always be usedxcframework(path:expectedSignature:status:condition:)
case xcframework(
path: Path,
expectedSignature: XCFrameworkSignature? = nil,
status: LinkingStatus = .required,
condition: PlatformCondition? = nil
)
Dependency on a xcframework
nil
if this should always be usedxctest
case xctest
Dependency on XCTest.
external(name:condition:)
case external(name: String, condition: PlatformCondition? = nil)
Dependency on an external dependency imported through Package.swift
.
nil
if this should always be usedtypeName
public var typeName: String
sdk(name:type:condition:)
public static func sdk(name: String, type: SDKType, condition: PlatformCondition? = nil) -> TargetDependency
Dependency on system library or framework
ARKit.framework
, libc++.tbd
.required
nil
if this should always be usedName | Description |
---|---|
name | Name of the system library or framework (including extension) e.g. ARKit.framework , libc++.tbd |
type | Whether or not this dependecy is required. Defaults to .required |
condition | condition under which to use this dependency, nil if this should always be used |
target(_:condition:)
public static func target(_ target: Target, condition: PlatformCondition? = nil) -> TargetDependency
Dependency on another target within the same project. This is just syntactic sugar for .target(name: target.name)
.
nil
if this should always be usedName | Description |
---|---|
target | Instance of the target to depend on |
condition | condition under which to use this dependency, nil if this should always be used |