bazelbuild/rules_apple

Bazel rules to build apps for Apple platforms.

593

stars

2,781

commits

Starlark

primary language

Sep 10, 2026

updated

apple
bazel
bazel-rules
Browse cluster: Bazel build rules and language support

README

Apple Rules for Bazel

This repository contains rules for Bazel that can be used to bundle applications for Apple platforms.

These rules handle the linking and bundling of applications and extensions (that is, the formation of an .app with an executable and resources, archived in an .ipa). Compilation is still performed by the existing objc_library rule in Bazel, and by the swift_library rule available from rules_swift.

If you are looking for an easy way to build mixed language frameworks, check out rules_swift's mixed_language_library.

Reference documentation

Click here for the reference documentation for the rules and other definitions in this repository.

Quick setup

Copy the latest MODULE.bazel snippet from the releases page.

Examples

Minimal example:

load("@rules_apple//apple:ios.bzl", "ios_application")
load("@rules_swift//swift:swift.bzl", "swift_library")

swift_library(
    name = "MyLibrary",
    srcs = glob(["**/*.swift"]),
)

ios_application(
    name = "App",
    bundle_id = "com.example.app",
    families = ["iphone"],
    minimum_os_version = "26.0",
    deps = [":MyLibrary"],
)

See the examples directory for sample applications.

Supported bazel versions

rules_apple and rules_swift are often affected by changes in bazel itself. This means you generally need to update these rules as you update bazel.

You can also see the supported bazel versions in the notes for each release on the releases page.

Besides these constraints this repo follows semver as best as we can since the 1.0.0 release.

Bazel releaseMinimum supported rules versionFinal supported rules versionSupporting Branch
10.x (most recent rolling)2.*currentmain
9.x2.*currentmain
8.x2.*currentmain
7.x2.*4.*bazel/7.x
6.x2.*3.13.0N/A
5.x0.33.01.*bazel/5.x
4.x0.30.00.32.0N/A
3.x0.20.00.21.2N/A

Contributors

(top 30 of 142)

keith

683 commits

sergiocampama

471 commits

thomasvl

392 commits

brentleyjones

189 commits

bazelbuild/rules_apple

Bazel rules to build apps for Apple platforms.

593

stars

2,781

commits

Starlark

primary language

Sep 10, 2026

updated

apple
bazel
bazel-rules
Browse cluster: Bazel build rules and language support

README

Apple Rules for Bazel

This repository contains rules for Bazel that can be used to bundle applications for Apple platforms.

These rules handle the linking and bundling of applications and extensions (that is, the formation of an .app with an executable and resources, archived in an .ipa). Compilation is still performed by the existing objc_library rule in Bazel, and by the swift_library rule available from rules_swift.

If you are looking for an easy way to build mixed language frameworks, check out rules_swift's mixed_language_library.

Reference documentation

Click here for the reference documentation for the rules and other definitions in this repository.

Quick setup

Copy the latest MODULE.bazel snippet from the releases page.

Examples

Minimal example:

load("@rules_apple//apple:ios.bzl", "ios_application")
load("@rules_swift//swift:swift.bzl", "swift_library")

swift_library(
    name = "MyLibrary",
    srcs = glob(["**/*.swift"]),
)

ios_application(
    name = "App",
    bundle_id = "com.example.app",
    families = ["iphone"],
    minimum_os_version = "26.0",
    deps = [":MyLibrary"],
)

See the examples directory for sample applications.

Supported bazel versions

rules_apple and rules_swift are often affected by changes in bazel itself. This means you generally need to update these rules as you update bazel.

You can also see the supported bazel versions in the notes for each release on the releases page.

Besides these constraints this repo follows semver as best as we can since the 1.0.0 release.

Bazel releaseMinimum supported rules versionFinal supported rules versionSupporting Branch
10.x (most recent rolling)2.*currentmain
9.x2.*currentmain
8.x2.*currentmain
7.x2.*4.*bazel/7.x
6.x2.*3.13.0N/A
5.x0.33.01.*bazel/5.x
4.x0.30.00.32.0N/A
3.x0.20.00.21.2N/A

Contributors

(top 30 of 142)

keith

683 commits

sergiocampama

471 commits

thomasvl

392 commits

brentleyjones

189 commits

Languages

Starlark

80.3%

Python

11.8%

Shell

6.7%