API Documentation: XcodeIdeTarget

Represents a Xcode IDE target.

A target specifies a product to build and contains the instructions for building the product from a set of files in a project or workspace. A target defines a single product; it organizes the inputs into the build system—the source files and instructions for processing those source files—required to build that product. Projects can contain one or more targets, each of which produces one product.

—Xcode Targets Concept

Properties

Property Description

buildConfigurations

The build configurations this target can build.

ideTarget

Returns this Xcode target instance. This method is offered for convenience when configuring Xcode IDE via the build DSL.

productName

The product name this target is building. Typically, the product name is the base name of the produce reference.

productReference

The reference filename of the product. The reference refers to the file name and extension of the built product.

productType

The product type this target is building.

Instances of are available via constants or via the factory.

sources

The sources this target will build.

Methods

Method Description

buildConfigurations(action)

Configures the build configuration container with the specified action.

Property Details

NamedDomainObjectContainer<XcodeIdeBuildConfiguration> buildConfigurations (read-only)

The build configurations this target can build.

XcodeIdeTarget ideTarget (read-only)

Returns this Xcode target instance. This method is offered for convenience when configuring Xcode IDE via the build DSL.

Property<String> productName

The product name this target is building. Typically, the product name is the base name of the produce reference.

Property<String> productReference

The reference filename of the product. The reference refers to the file name and extension of the built product.

Property<XcodeIdeProductType> productType

The product type this target is building.

Instances of XcodeIdeProductType are available via XcodeIdeProductTypes constants or via the XcodeIdeProjectExtension factory.

ConfigurableFileCollection sources (read-only)

The sources this target will build.

Method Details

void buildConfigurations(Action<? super NamedDomainObjectContainer<XcodeIdeBuildConfiguration>> action)

Configures the build configuration container with the specified action.