Potentially breaking changes
- A
platform_mappings
file is now required in some cases. If you do not already have one you can copy rules_apple's - Test targets now require
minimum_os_version
(#2124) - Adds target name to bundle output paths when
bundle_name
differs fromname
. This allows having targets with the samebundle_name
in the sameBUILD
file, thanks @chiragramani! - Replaced
apple_common.multi_arch_split
with new transition, this should not be a breaking change but is required for bazel 7.x support. Please file any issues you find! - Removes any support for Xcode prior to 14 from the rules, matching the supported versions from the App Store
- Imported versioned (macOS) frameworks need to be the correct format (https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle), and currently don't support
--@build_bazel_rules_apple//apple/build_settings:use_tree_artifacts_outputs
/--define=apple.experimental.tree_artifact_outputs=1
Notable additions
- Add support for app intents through the
app_intents
attribute - Add ExtensionKit support to
ios_extension
,macos_extension
, andtvos_extension
rules - Add rpaths to
apple_xcframework
generated binaries - Add support for watchOS single target applications, thanks @BalestraPatrick!
- Adding Support for UI Test Coverage, thanks @gabijarciskeviciute and @mattrobmattrob!
Notable improvements
- Include
private_deps
when gathering resources for Apple rules - Include Apple Symbols for watchOS extensions, thanks @BalestraPatrick!
- Document Xcode version selection and invalidation strategy, thanks @BalestraPatrick!
- Improve exception message catching when running tests, thanks @sebastianv1!
- Embed frameworks in
ios_message_extension
, thanks @brentleyjones!
Migrations
--@build_bazel_rules_apple//apple/build_settings:use_tree_artifacts_outputs
should be used instead of--define=apple.experimental.tree_artifact_outputs=1
. Support for the define will be removed in the future.--@build_bazel_rules_apple//apple/build_settings:signing_certificate_name
should be used instead of--ios_signing_cert_name
This release is compatible with 6.x LTS and bazel 7.x rolling releases
MODULE.bazel Snippet
bazel_dep(name = "rules_apple", version = "3.0.0-rc1", repo_name = "build_bazel_rules_apple")
Workspace Snippet
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_apple",
sha256 = "62b24b9c3c1eb5bdb6fe1a3f4bf541d6e61eac8997e87c25a50c821f85bf8ff2",
url = "https://github.com/bazelbuild/rules_apple/releases/download/3.0.0-rc1/rules_apple.3.0.0-rc1.tar.gz",
)
load(
"@build_bazel_rules_apple//apple:repositories.bzl",
"apple_rules_dependencies",
)
apple_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)
swift_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)
swift_rules_extra_dependencies()
load(
"@build_bazel_apple_support//lib:repositories.bzl",
"apple_support_dependencies",
)
apple_support_dependencies()