STRUCT
Target
Contents
- Properties
namedestinationsproductproductNamebundleIddeploymentTargetsinfoPlistbuildableFolderssourcesplaygroundsresourcescopyFilesheadersentitlementsscriptsdependenciesignoreDependenciesprioritizeDependenciessettingscoreDataModelsenvironmentVariableslaunchArgumentsadditionalFilespreCreatedFilesbuildRulesmergedBinaryTypemergeablefilesGroupprune
- Methods
init(name:destinations:product:productName:bundleId:deploymentTargets:infoPlist:buildableFolders:sources:playgrounds:resources:copyFiles:headers:entitlements:scripts:dependencies:ignoreDependencies:prioritizeDependencies:settings:coreDataModels:environmentVariables:launchArguments:additionalFiles:preCreatedFiles:buildRules:mergedBinaryType:mergeable:filesGroup:)==(_:_:)hash(into:)<(_:_:)encode(to:)init(from:)
public struct Target: Codable, Equatable, Hashable, ComparableA target of a project.
Properties
name
public var name: StringThe name of the target. Also, the product name if not specified with productName.
destinations
public var destinations: DestinationsThe destinations this target supports, e.g. iPhone, appleVision, macCatalyst
product
public var product: ProductThe type of build product this target will output.
productName
public var productName: StringThe built product name. If nil, it will be equal to name.
bundleId
public var bundleId: String?The product bundle identifier.
deploymentTargets
public var deploymentTargets: DeploymentTargetsThe minimum deployment targets your product will support.
infoPlist
public var infoPlist: InfoPlist?The Info.plist representation.
buildableFolders
public var buildableFolders: [BuildableFolder]Buildable folders of the target.
sources
public var sources: [SourceFiles]The source files of the target. Note: any playgrounds matched by the globs used in this property will be automatically added.
playgrounds
public var playgrounds: [FilePath]resources
public var resources: [ResourceFileElement]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: HeadersList?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.
ignoreDependencies
public var ignoreDependencies: [TargetDependency]Dependencies to ignore. Can be useful to disable unwanted transitive dependency.
prioritizeDependencies
public var prioritizeDependencies: [TargetDependency]Dependencies to prioritize in link phase. Every dependency listed here will be at the start of the 'Link Binary With Libraries' phase in the same order.
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.
preCreatedFiles
public var preCreatedFiles: [String]These files will be created before project generation
buildRules
public var buildRules: [BuildRule]The build rules used for transformation of source files during compilation.
mergedBinaryType
public var mergedBinaryType: MergedBinaryTypeSpecifies whether if the target can merge or not the dynamic dependencies as part of its binary
mergeable
public var mergeable: BoolSpecifies whether if the target can be merged as part of another binary or not
filesGroup
public var filesGroup: ProjectGroupprune
public var prune: BoolMethods
init(name:destinations:product:productName:bundleId:deploymentTargets:infoPlist:buildableFolders:sources:playgrounds:resources:copyFiles:headers:entitlements:scripts:dependencies:ignoreDependencies:prioritizeDependencies:settings:coreDataModels:environmentVariables:launchArguments:additionalFiles:preCreatedFiles:buildRules:mergedBinaryType:mergeable:filesGroup:)
public init(
name: String,
destinations: Destinations,
product: Product,
productName: String? = nil,
bundleId: String? = nil,
deploymentTargets: DeploymentTargets? = nil,
infoPlist: InfoPlist? = .default,
buildableFolders: [BuildableFolder] = [],
sources: SourceFilesList? = nil,
playgrounds: [FilePath] = [],
resources: ResourceFileElements? = nil,
copyFiles: [CopyFilesAction]? = nil,
headers: HeadersList? = nil,
entitlements: Entitlements? = nil,
scripts: [TargetScript] = [],
dependencies: [TargetDependency] = [],
ignoreDependencies: [TargetDependency] = [],
prioritizeDependencies: [TargetDependency] = [],
settings: Settings? = nil,
coreDataModels: [CoreDataModel] = [],
environmentVariables: [String: EnvironmentVariable] = [:],
launchArguments: [LaunchArgument] = [],
additionalFiles: [FileElement] = [],
preCreatedFiles: [String] = [],
buildRules: [BuildRule] = [],
mergedBinaryType: MergedBinaryType = .disabled,
mergeable: Bool = false,
filesGroup: ProjectGroup = .group(name: "Project")
)==(_:_:)
public static func == (lhs: Target, rhs: Target) -> BoolParameters
| Name | Description |
|---|---|
| lhs | A value to compare. |
| rhs | Another value to compare. |
hash(into:)
public func hash(into hasher: inout Hasher)Parameters
| Name | Description |
|---|---|
| hasher | The hasher to use when combining the components of this instance. |
<(_:_:)
public static func < (lhs: Target, rhs: Target) -> BoolParameters
| Name | Description |
|---|---|
| lhs | A value to compare. |
| rhs | Another value to compare. |
encode(to:)
public func encode(to encoder: Encoder) throwsParameters
| Name | Description |
|---|---|
| encoder | The encoder to write data to. |
init(from:)
public init(from decoder: Decoder) throwsParameters
| Name | Description |
|---|---|
| decoder | The decoder to read data from. |
