Skip to content

번역

이 페이지를 번역하거나 기존 번역을 개선할 수 있습니다.

기여

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:)
swift
public struct Target: Codable, Equatable, Sendable

A target of a project.

Properties

name

swift
public var name: String

The name of the target. Also, the product name if not specified with productName.

destinations

swift
public var destinations: Destinations

The destinations this target supports, e.g. iPhone, appleVision, macCatalyst

product

swift
public var product: Product

The type of build product this target will output.

productName

swift
public var productName: String?

The built product name. If nil, it will be equal to name.

bundleId

swift
public var bundleId: String

The product bundle identifier.

deploymentTargets

swift
public var deploymentTargets: DeploymentTargets?

The minimum deployment targets your product will support.

infoPlist

swift
public var infoPlist: InfoPlist?

The Info.plist representation.

sources

swift
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

swift
public var resources: ResourceFileElements?

The resource files of target. Note: localizable files, *.lproj, are supported.

copyFiles

swift
public var copyFiles: [CopyFilesAction]?

The build phase copy files actions for the target.

headers

swift
public var headers: Headers?

The headers for the target.

entitlements

swift
public var entitlements: Entitlements?

The entitlements representation

scripts

swift
public var scripts: [TargetScript]

The build phase scripts actions for the target.

dependencies

swift
public var dependencies: [TargetDependency]

The target's dependencies.

settings

swift
public var settings: Settings?

The target's settings.

coreDataModels

swift
public var coreDataModels: [CoreDataModel]

The Core Data models.

environmentVariables

swift
public var environmentVariables: [String: EnvironmentVariable]

The environment variables. Used by autogenerated schemes for the target.

launchArguments

swift
public var launchArguments: [LaunchArgument]

The launch arguments. Used by autogenerated schemes for the target.

additionalFiles

swift
public var additionalFiles: [FileElement]

The additional files for the target. For project's additional files, see Project/additionalFiles.

buildRules

swift
public var buildRules: [BuildRule]

The build rules used for transformation of source files during compilation.

mergedBinaryType

swift
public var mergedBinaryType: MergedBinaryType

Specifies whether if the target can merge or not the dynamic dependencies as part of its binary

mergeable

swift
public var mergeable: Bool

Specifies whether if the target can be merged as part of another binary or not

onDemandResourcesTags

swift
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:)

swift
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

Released under the MIT License.