STRUCT
Target
Contents
- Properties
name
destinations
product
productName
bundleId
deploymentTargets
infoPlist
sources
resources
copyFiles
headers
entitlements
scripts
dependencies
settings
coreDataModels
environmentVariables
launchArguments
additionalFiles
buildRules
mergedBinaryType
mergeable
onDemandResourcesTags
- Methods
target(name:destinations:product:productName:bundleId:deploymentTargets:infoPlist:sources:resources:copyFiles:headers:entitlements:scripts:dependencies:settings:coreDataModels:environmentVariables:launchArguments:additionalFiles:buildRules:mergedBinaryType:mergeable:onDemandResourcesTags:)
public struct Target: Codable, Equatable, Sendable
A target of a project.
Properties
name
public var name: String
The name of the target. Also, the product name if not specified with productName
.
destinations
public var destinations: Destinations
The destinations this target supports, e.g. iPhone, appleVision, macCatalyst
product
public var product: Product
The type of build product this target will output.
productName
public var productName: String?
The built product name. If nil, it will be equal to name
.
bundleId
public var bundleId: String
The product bundle identifier.
deploymentTargets
public var deploymentTargets: DeploymentTargets?
The minimum deployment targets your product will support.
infoPlist
public var infoPlist: InfoPlist?
The Info.plist representation.
sources
public var sources: SourceFilesList?
The source files of the target. Note: any playgrounds matched by the globs used in this property will be automatically added.
resources
public var resources: ResourceFileElements?
The resource files of target. Note: localizable files, *.lproj
, are supported.
copyFiles
public var copyFiles: [CopyFilesAction]?
The build phase copy files actions for the target.
headers
public var headers: Headers?
The headers for the target.
entitlements
public var entitlements: Entitlements?
The entitlements representation
scripts
public var scripts: [TargetScript]
The build phase scripts actions for the target.
dependencies
public var dependencies: [TargetDependency]
The target's dependencies.
settings
public var settings: Settings?
The target's settings.
coreDataModels
public var coreDataModels: [CoreDataModel]
The Core Data models.
environmentVariables
public var environmentVariables: [String: EnvironmentVariable]
The environment variables. Used by autogenerated schemes for the target.
launchArguments
public var launchArguments: [LaunchArgument]
The launch arguments. Used by autogenerated schemes for the target.
additionalFiles
public var additionalFiles: [FileElement]
The additional files for the target. For project's additional files, see Project/additionalFiles
.
buildRules
public var buildRules: [BuildRule]
The build rules used for transformation of source files during compilation.
mergedBinaryType
public var mergedBinaryType: MergedBinaryType
Specifies whether if the target can merge or not the dynamic dependencies as part of its binary
mergeable
public var mergeable: Bool
Specifies whether if the target can be merged as part of another binary or not
onDemandResourcesTags
public var onDemandResourcesTags: OnDemandResourcesTags?
The target's tags associated with on demand resources
Methods
target(name:destinations:product:productName:bundleId:deploymentTargets:infoPlist:sources:resources:copyFiles:headers:entitlements:scripts:dependencies:settings:coreDataModels:environmentVariables:launchArguments:additionalFiles:buildRules:mergedBinaryType:mergeable:onDemandResourcesTags:)
public static func target(
name: String,
destinations: Destinations,
product: Product,
productName: String? = nil,
bundleId: String,
deploymentTargets: DeploymentTargets? = nil,
infoPlist: InfoPlist? = .default,
sources: SourceFilesList? = nil,
resources: ResourceFileElements? = nil,
copyFiles: [CopyFilesAction]? = nil,
headers: Headers? = nil,
entitlements: Entitlements? = nil,
scripts: [TargetScript] = [],
dependencies: [TargetDependency] = [],
settings: Settings? = nil,
coreDataModels: [CoreDataModel] = [],
environmentVariables: [String: EnvironmentVariable] = [:],
launchArguments: [LaunchArgument] = [],
additionalFiles: [FileElement] = [],
buildRules: [BuildRule] = [],
mergedBinaryType: MergedBinaryType = .disabled,
mergeable: Bool = false,
onDemandResourcesTags: OnDemandResourcesTags? = nil
) -> Self