ENUM
TargetDependency
Contents
- Cases
target(name:status:condition:)local(name:status:condition:)project(target:path:status:condition:)framework(path:status:condition:)library(path:publicHeaders:swiftModuleMap:condition:)sdk(name:type:status:condition:)xcframework(path:status:condition:)bundle(path:condition:)xctestexternal(name:condition:)
- Properties
typeName
- Methods
sdk(name:type:condition:)target(_:condition:)
swift
public enum TargetDependency: Codable, HashableA target dependency.
Cases
target(name:status:condition:)
swift
case target(name: String, status: LinkingStatus = .required, condition: PlatformCondition? = nil)Dependency on another target within the same project
- Parameters:
- name: Name of the target to depend on
- status: The dependency status (optional dependencies are weakly linked)
- condition: condition under which to use this dependency,
nilif this should always be used
local(name:status:condition:)
swift
case local(name: String, status: LinkingStatus = .required, condition: PlatformCondition? = nil)Dependency on a local target from another project
- Parameters:
- name: Name of the target to depend on
- condition: condition under which to use this dependency,
nilif this should always be used
project(target:path:status:condition:)
swift
case project(target: String, path: FilePath, status: LinkingStatus = .required, condition: PlatformCondition? = nil)Dependency on a target within another project
- Parameters:
- target: Name of the target to depend on
- path: Relative path to the other project directory
- status: The dependency status (optional dependencies are weakly linked)
- condition: condition under which to use this dependency,
nilif this should always be used
framework(path:status:condition:)
swift
case framework(path: FilePath, status: LinkingStatus = .required, condition: PlatformCondition? = nil)Dependency on a prebuilt framework
- Parameters:
- path: Relative path to the prebuilt framework
- status: The dependency status (optional dependencies are weakly linked)
- condition: condition under which to use this dependency,
nilif this should always be used
library(path:publicHeaders:swiftModuleMap:condition:)
swift
case library(path: FilePath, publicHeaders: FilePath, swiftModuleMap: FilePath?, condition: PlatformCondition? = nil)Dependency on prebuilt library
- Parameters:
- path: Relative path to the prebuilt library
- publicHeaders: Relative path to the library's public headers directory
- swiftModuleMap: Relative path to the library's swift module map file
- condition: condition under which to use this dependency,
nilif this should always be used
sdk(name:type:status:condition:)
swift
case sdk(name: String, type: SDKType, status: LinkingStatus, condition: PlatformCondition? = nil)Dependency on system library or framework
- Parameters:
- name: Name of the system library or framework (not including extension) e.g.
ARKit,c++ - type: The dependency type
- status: The dependency status (optional dependencies are weakly linked)
- condition: condition under which to use this dependency,
nilif this should always be used
- name: Name of the system library or framework (not including extension) e.g.
xcframework(path:status:condition:)
swift
case xcframework(path: FilePath, status: LinkingStatus = .required, condition: PlatformCondition? = nil)Dependency on a xcframework
- Parameters:
- path: Relative path to the xcframework
- status: The dependency status (optional dependencies are weakly linked)
- condition: condition under which to use this dependency,
nilif this should always be used
bundle(path:condition:)
swift
case bundle(path: FilePath, condition: PlatformCondition? = nil)xctest
swift
case xctestDependency on XCTest.
external(name:condition:)
swift
case external(name: String, condition: PlatformCondition? = nil)Dependency on an external dependency imported through Dependencies.swift.
- Parameters:
- name: Name of the external dependency
- condition: condition under which to use this dependency,
nilif this should always be used
Properties
typeName
swift
public var typeName: StringMethods
sdk(name:type:condition:)
swift
public static func sdk(name: String, type: SDKType, condition: PlatformCondition? = nil) -> TargetDependencyDependency on system library or framework
- Parameters:
- 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,
nilif this should always be used
- name: Name of the system library or framework (including extension) e.g.
Parameters
| Name | 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:)
swift
public static func target(_ target: Target, condition: PlatformCondition? = nil) -> TargetDependencyDependency on another target within the same project. This is just syntactic sugar for .target(name: target.name).
- Parameters:
- target: Instance of the target to depend on
- condition: condition under which to use this dependency,
nilif this should always be used
Parameters
| Name | Description |
|---|---|
| target | Instance of the target to depend on |
| condition | condition under which to use this dependency, nil if this should always be used |
