Structure
BuildAction
Compiles the app.
struct BuildActionOverview
iOS: Uses
xcodebuild build. Produces compiled products in the derived data directory. Does not create an.xcarchiveor.ipa— useArchiveActionfor distribution builds.Android: Uses
./gradlew assemble<Variant>. Produces a debug or release APK. For production AAB builds, useArchiveActionwithbuildType: .aab.
Usage
// iOS
let result = try await BuildAction().run(
with: .init(scheme: "MyApp", configuration: .release),
context: context
)
print("App path: \(result.appPath ?? "N/A")")
// Android
let result = try await BuildAction().run(
with: .init(module: "app", buildVariant: "release"),
context: androidContext
)
print("APK path: \(result.apkPath ?? "N/A")")Topics
Configuration
struct OptionsConfiguration options for the build action.
Results
struct ResultResult of a successful build.
Initializers
init()Creates a
BuildAction.
Instance Methods
func run(with: BuildAction.Options, context: ActionContext) async throws -> BuildAction.ResultExecute the build action.
Type Properties
static let description: StringHuman-readable description for
--helpoutput.static let name: StringThe registered name used in Shipfile lanes.
static var validationRules: [ActionValidationRule]
Enumerations
enum BuildConfigurationBuild configuration preset (iOS).
Default Implementations
Relationships
Conforms To
ActionSwift.SendableSwift.SendableMetatype