Skip to content

Releases: bazelbuild/rules_apple

3.0.0-rc1

28 Aug 22:40
6114208
Compare
Choose a tag to compare
3.0.0-rc1 Pre-release
Pre-release

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 from name. This allows having targets with the same bundle_name in the same BUILD 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, and tvos_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()

2.5.0

17 Jul 15:35
4b4f645
Compare
Choose a tag to compare

What's Changed

  • Fixed ios_x86_64_sim_reuse_disabled_runner typo
  • Added support for --command_line_args in ios_xctestrun_runner
  • xcodebuild is now used for device tests

This release is compatible with 6.x LTS and bazel 7.x rolling releases

MODULE.bazel Snippet

bazel_dep(name = "rules_apple", version = "2.5.0", 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 = "8ac4c7997d863f3c4347ba996e831b5ec8f7af885ee8d4fe36f1c3c8f0092b2c",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/2.5.0/rules_apple.2.5.0.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()

2.4.1

07 Jul 22:03
0842f49
Compare
Choose a tag to compare

What's Changed

  • Fixed making Frameworks directory in device UI tests when it already exists, thanks @erikkerber!
  • Updated rules_swift to fix index-import bug with swift.use_global_index_store

This release is compatible with 6.x LTS and bazel 7.x rolling releases

MODULE.bazel Snippet

bazel_dep(name = "rules_apple", version = "2.4.1", 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 = "2a0a35c9f72a0b0ac9238ecb081b0da4bb3e9739e25d2a910cc6b4c4425c01be",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/2.4.1/rules_apple.2.4.1.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()

2.4.0

30 Jun 22:33
94bade4
Compare
Choose a tag to compare

What's Changed

  • Fix alternate icons support for single device-family apps
  • Optimize dtrace, support objc_library compile
  • Add support for apple.locales_to_exclude
  • Only fail ios_xctestrun_runner when bundle executes nothing
  • Support on device UI Testing in the new runner
  • Rename generated experimental_mixed_language_library module map
  • Fix UI testing with new runner in Xcode 15+
  • Fix XCTestRun attachment lifetime in the new runner
  • Fix Metal headers not included in MetalCompile actions
  • Add xcarchive rule to generate Xcode archives
  • Add macos_framework and macos_static_framework to support macOS

This release is compatible with 6.x LTS and bazel 7.x rolling releases

MODULE.bazel Snippet

bazel_dep(name = "rules_apple", version = "2.4.0", 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 = "a656466b0af05c2345b7e090cfced2db791d2719126b3297beb26626ec7da208",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/2.4.0/rules_apple.2.4.0.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()

2.3.0

17 May 17:43
915ac30
Compare
Choose a tag to compare

What's Changed

  • Deprecate support for runtime_deps which have been removed from bazel. Use data instead.
  • Add testonly support to experimental_mixed_language_library
  • Remove support for bitcode now that Xcode 14.1 is the minimum supported version required for uploading to the App Store
  • Fix UI tests with the new test runner and Xcode 14.3, thanks @maxwellE!
  • Update xctestrunner to support Xcode 14.3
  • Respect --incompatible_objc_alwayslink_by_default

This release is compatible with 6.x LTS and bazel 7.x rolling releasess

MODULE.bazel Snippet

bazel_dep(name = "rules_apple", version = "2.3.0", 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 = "a6141240657093fa7ccc7ca1ee5a62408dd9996d1bf47bc2369b8b9faefb2698",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/2.3.0/rules_apple.2.3.0.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()

2.2.0

24 Mar 18:04
935d5ad
Compare
Choose a tag to compare

What's Changed

  • Added data attribute to apple_static_{framework,xcframework}_import rules (#1841)
  • Added framework linking info to CcInfo of framework rules (#1845)
  • Added linking info to CcInfos of apple_framework_import rules (#1847)
  • Coverage manifest change is now applied to the new test runner (#1846)
  • Deps no longer require the ObjcProvider provider (#1854)
  • Reverted "Fix linkmap test on M1s (#1595)" (#1866)
  • Added support for UI testing with ios_xctestrun_runner (#1852)
  • Added support for simulator name input to ios_xctestrun_runner (#1874)
  • Added custom xcodebuild args to ios_xctestrun_runner (#1876)
  • Added test_filter/--test_filter support to ios_xctestrun_runner (#1878)
  • [ios_xctestrun_runner] Force xcodebuild sometimes (#1882)
  • Added ios_xctestrun_runner rule override attributes (#1884)
  • clang_rt is now included independent of asan, tsan, and ubsan features (#1883)
  • Added more entitlements validation (#1888)
  • TEST_UNDECLARED_OUTPUTS_DIR is now passed to test processes (#1889)
  • Fixed linking static frameworks with sdk requirements (#1892)
  • Added DEBUG_XCTESTRUNNER var (#1890)
  • Removed implicit_outputs from apple_binary (#1898)
  • Fixed clangrttool if Xcode is installed in a non default location (#1905)
  • Added dylib extension to dynamic libraries (#1897)
  • Renamed macOS xcresult bundle filename (#1920)
  • DefaultInfo.files_to_run is now used for resolved_tools executables (#1923)

This release is compatible with: 6.0.0

MODULE.bazel Snippet

bazel_dep(name = "rules_apple", version = "2.2.0", 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 = "9e26307516c4d5f2ad4aee90ac01eb8cd31f9b8d6ea93619fc64b3cbc81b0944",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/2.2.0/rules_apple.2.2.0.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()

2.1.0

21 Feb 21:29
3d24691
Compare
Choose a tag to compare

What's Changed

  • Reverted "Strip bitcode from stub binaries" (#1755)
  • Hardened framework import Headers/ parsing (#1798)
  • Added xctestrun based iOS unit test runner (#1612)
  • Removed subpar dependency (#1746)
  • Added Bzlmod module_extension for provisioning_profile_repository (#1808)
  • Added override for startup_timeout_sec in tests (#1810)
  • Add experimental_mixed_language_library macro to support building mixed Objective-C and Swift modules (#1812)
  • Fixed test crash at launch on iOS 14 (#1822)
  • Upgraded xctestrunner to 24629f3e6c0dda397f14924b64eb45d04433c07e (#1823)
  • Updated apple_support to 1.4.1 (#1837)
  • Upgrades rules_swift to 1.6.0 (#1839)

This release is compatible with: 6.0.0

MODULE.bazel Snippet

bazel_dep(name = "rules_apple", version = "2.1.0", 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 = "3e2c7ae0ddd181c4053b6491dad1d01ae29011bc322ca87eea45957c76d3a0c3",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/2.1.0/rules_apple.2.1.0.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()

2.0.0

21 Dec 16:59
c628b0e
Compare
Choose a tag to compare

What's Changed

  • Add mnemonic to FindProvisioningProfile, thanks @erikkerber!
  • Ignore skip_codesign_simulator_bundles for frameworks when building for device, thanks @BalestraPatrick!
  • Allow for deps with only CcInfo on framework imports, thanks @dierksen!
  • Update rules_swift
  • Add validation for the proximity reader payment entitlement (#1740)
  • Strip bitcode from stub binaries to fix errors during App Store Connect validation (#1703)
  • Add resources support to apple_static_xcframework (#1577)
  • Add sanitizer support for iOS tests (#1590)
  • The 2.x releases drop support for Bazel 5.x TLS. Use the 1.x releases for bazel 5.x

This release is compatible with: 6.0.0

Workspace Snippet

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "build_bazel_rules_apple",
    sha256 = "43737f28a578d8d8d7ab7df2fb80225a6b23b9af9655fcdc66ae38eb2abcf2ed",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/2.0.0/rules_apple.2.0.0.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()

2.0.0-rc2

02 Dec 01:12
856ebda
Compare
Choose a tag to compare
2.0.0-rc2 Pre-release
Pre-release

What's Changed

  • Add mnemonic to FindProvisioningProfile, thanks @erikkerber!
  • Ignore skip_codesign_simulator_bundles for frameworks when building for device, thanks @BalestraPatrick!
  • Allow for deps with only CcInfo on framework imports, thanks @dierksen!
  • Update rules_swift
  • The 2.x releases drop support for Bazel 5.x TLS. Use the 1.x releases for bazel 5.x

This release is compatible with: 6.0.0rc3+

Workspace Snippet

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "build_bazel_rules_apple",
    sha256 = "44c803313904f94ea14f55269c9ffabd355f66c9dca98768b907aff61c97abc3",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/2.0.0-rc2/rules_apple.2.0.0-rc2.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()

2.0.0-rc1

08 Nov 13:04
f254dde
Compare
Choose a tag to compare
2.0.0-rc1 Pre-release
Pre-release
  • Add validation for the proximity reader payment entitlement (#1740)
  • Strip bitcode from stub binaries to fix errors during App Store Connect validation (#1703)
  • Add resources support to apple_static_xcframework (#1577)
  • Add sanitizer support for iOS tests (#1590)
  • This release is tested with Bazel 6.0.0rc1 and support for Bazel 5.x TLS was dropped.

Please use the release asset from your Bazel WORKSPACE instead of
GitHub's asset to reduce download size and improve reproducibility.

SHA-256 digest: bf48acc73e536d36b4942857647ac219512d4984aca6ae083a11fd3fd540faa0