STRUCT
BuildAction 
Contents
- Properties- targets
- preActions
- postActions
- buildOrder
- runPostActionsOnFailure
- findImplicitDependencies
 
- Methods- buildAction(targets:preActions:postActions:buildOrder:runPostActionsOnFailure:findImplicitDependencies:)
 
swift
public struct BuildAction: Equatable, Codable, SendableAn action that builds products.
It's initialized with the .buildAction static method.
Properties 
targets 
swift
public var targets: [TargetReference]A list of targets to build, which are defined in the project.
preActions 
swift
public var preActions: [ExecutionAction]A list of actions that are executed before starting the build process.
postActions 
swift
public var postActions: [ExecutionAction]A list of actions that are executed after the build process.
buildOrder 
swift
public var buildOrder: BuildOrderDefines the order in which targets are built.
runPostActionsOnFailure 
swift
public var runPostActionsOnFailure: BoolWhether the post actions should be run in the case of a failure
findImplicitDependencies 
swift
public var findImplicitDependencies: BoolWhether Xcode should be allowed to find dependencies implicitly. The default is true.
Methods 
buildAction(targets:preActions:postActions:buildOrder:runPostActionsOnFailure:findImplicitDependencies:) 
swift
public static func buildAction(
    targets: [TargetReference],
    preActions: [ExecutionAction] = [],
    postActions: [ExecutionAction] = [],
    buildOrder: BuildOrder = .dependency,
    runPostActionsOnFailure: Bool = false,
    findImplicitDependencies: Bool = true
) -> BuildActionReturns a build action.
- Parameters: - targets: A list of targets to build, which are defined in the project.
- preActions: A list of actions that are executed before starting the build process.
- postActions: A list of actions that are executed after the build process.
- buildOrder: Defines the order in which targets are built. Defaults to .dependency.
- runPostActionsOnFailure: Whether the post actions should be run in the case of a failure
- findImplicitDependencies: Whether Xcode should be allowed to find dependencies implicitly. The default is true.
 
- Returns: Initialized build action.
Parameters 
| Name | Description | 
|---|---|
| targets | A list of targets to build, which are defined in the project. | 
| preActions | A list of actions that are executed before starting the build process. | 
| postActions | A list of actions that are executed after the build process. | 
| buildOrder | Defines the order in which targets are built. Defaults to .dependency. | 
| runPostActionsOnFailure | Whether the post actions should be run in the case of a failure | 
| findImplicitDependencies | Whether Xcode should be allowed to find dependencies implicitly. The default is true. | 
