You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Click here
for the reference documentation for the rules and other definitions in this
repository.
Quick setup
Copy the latest MODULE.bazel or WORKSPACE snippet from the releases
page.
Examples
Minimal example:
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
swift_library(
name="MyLibrary",
srcs=glob(["**/*.swift"]),
data= [":Main.storyboard"],
)
# Links code from "deps" into an executable, collects and compiles resources# from "deps" and places them with the executable in an .app bundle, and then# outputs an .ipa with the bundle in its Payload directory.ios_application(
name="App",
bundle_id="com.example.app",
families= [
"iphone",
"ipad",
],
infoplists= [":Info.plist"],
minimum_os_version="15.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.