Skip to content

apple_application

Apple application bundle.

Description

Builds an Apple application bundle with a generated Info.plist property-list file, linked dependencies, embedded frameworks, and ad-hoc signing. The run capability builds the required bundle and launches it. Attributes whose names contain sdk configure the Apple software development kit (SDK) used for the build.

Attributes

AttributeTypeRequiredDefaultDescription
platformstringyesApple platform for the application
bundle_idstringyesApplication bundle identifier
minimum_osstringno13.0Minimum supported operating system version
target_sdk_versionstringnominimum_osSoftware development kit version used in the target triple
sdk_variantstringnosimulatorsimulator or device; ignored on macOS (not configurable)
xcode_developer_dirstringnoactive XcodeXcode developer directory used to resolve build tools
familieslist<string>no[]Supported device families (iphone, ipad); an empty list uses iphone
product_namestringnotarget nameApplication product name (not configurable)
resourceslist<string>no[]Resource and asset catalog glob patterns
asset_catalogslist<string>no[]Asset catalog paths compiled into the application bundle
info_pliststringnoInfo.plist template path
info_plist_substitutionsmap<string,string>no{}Values substituted into the generated Info.plist
entitlementsstringnoEntitlements plist path
provisioning_profilestringnoProvisioning profile label or path used for signing
signing_identitystringnoLocal signing identity selector used for development device signing
signingstringnoad_hocSigning mode or policy name
sdk_frameworkslist<string>no[]Apple software development kit frameworks linked by name
weak_sdk_frameworkslist<string>no[]Apple software development kit frameworks linked weakly
sdk_dylibslist<string>no[]Apple software development kit dynamic libraries linked by name
linkoptslist<string>no[]Extra linker flags
swift_flagslist<string>no[]Extra Swift compiler flags

Dependency Edges

EdgeAcceptsDescription
depsapple_linkable, apple_framework, apple_resource, apple_swift_plugin, native_linkableLibraries, frameworks, resources, native linkables, and Swift compiler plugins embedded in the app

Providers

The target emits apple_application and apple_bundle.

Capabilities

CapabilityOutput groupsRequires
builddefault, bundle, dsyms
rundefaultbundle

Outputs

OutputLocation
Application bundle.once/out/<target>/<product_name>.app
Executable.once/out/<target>/<product_name>.app/<product_name>
Property list.once/out/<target>/<product_name>.app/Info.plist
Embedded frameworks.once/out/<target>/<product_name>.app/Frameworks when the target depends on frameworks
Code signature.once/out/<target>/<product_name>.app/_CodeSignature/CodeResources
Run record.once/out/<target>/run/run.json after once run
Run log.once/out/<target>/run/run.log after once run

Running

once run launches macOS apps with the host app launcher and iOS simulator apps with simctl boot, install, and launch. Pass once run --visible to also open Simulator for the selected simulator before installing and launching the app.

Each run writes a run record and log under the target's output directory. Repeated runs launch the application again rather than replaying an action-cache hit. Physical-device launch is unsupported.

Limitations

Resource bundling, asset catalogs, custom property-list templates, entitlements, provisioning profiles, signing identities, and signing modes other than ad_hoc are unsupported. The target rejects unsupported values instead of ignoring them.

Example

toml
[[target]]
name = "Hello"
kind = "apple_application"
srcs = ["Sources/**/*.swift"]

[target.attrs]
platform = "ios"
bundle_id = "dev.once.Hello"
minimum_os = "17.0"
families = ["iphone"]

Released under an open-source license.