Skip to content

Releases: bazelbuild/rules_apple

3.5.1

09 Apr 13:41
d4b6341
Compare
Choose a tag to compare

What's Changed

  • Codesigning is now properly unsandboxed again (which regressed in 3.5.0)

This release is compatible with Bazel 6.x LTS, 7.x LTS, and 8.x rolling releases.

MODULE.bazel Snippet

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

3.5.0

05 Apr 15:49
1c5720a
Compare
Choose a tag to compare

What's Changed

  • Remove ctx.resolve_tools in favor of ctx.actions.run(executable = …) and ctx.actions.run(tools = ...) (Thanks, @tjgq!)
  • Update apple_support, platforms, and rules_swift

This release is compatible with Bazel 6.x LTS, 7.x LTS, and 8.x rolling releases

MODULE.bazel Snippet

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

3.4.0

28 Mar 13:22
c00a35f
Compare
Choose a tag to compare

What's Changed

  • Fix apple_dynamic_framework_import search paths, thanks @jpsim!
  • Allow underscores in bundle identifiers, thanks @aaronsky!
  • Fix undefined symbols warning with intents stub binary, thanks @keith!
  • Fix private header support in experimental_mixed_language_library, thanks @luispadron!
  • Add apple_metal_library rule, thanks @aaronsky!
  • Allow space in bundle_name for ipa_post_processor, thanks @luispadron!
  • Bundle libMainThreadChecker.dylib to detect main thread violations, thanks @chiragramani!
  • Replace usages of to_json() with json.encode(..), thanks @c-mita!
  • Update rules_swift to 1.17.0
  • Add locales_to_include as target attribute, thanks @sebastianv1!
  • Fix ios_extension with resources, thanks @jszumski!

This release is compatible with Bazel 6.x LTS, 7.x LTS, and 8.x rolling releases

MODULE.bazel Snippet

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

3.3.0

20 Feb 20:39
26f0100
Compare
Choose a tag to compare

What's Changed

  • Disable pngcrush on macOS by default, thanks @maxbelanger!
  • Don't set an install path for macOS QuickLook plugins, thanks @maxbelanger!
  • Fix issues with experimental_mixed_language_library header map, thanks @luispadron!
  • Fix apple_static_framework_import missing search paths, thanks @vakhidbetrakhmadov!
  • Fix dynamic framework skipping lipo, thanks @xiemotongye!
  • Fix custom repo name when using bzlmod, thanks @brentleyjones!
  • Fix bazel @ HEAD compatibility

This release is compatible with Bazel 6.x LTS, 7.x LTS, and 8.x rolling releases

MODULE.bazel Snippet

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

3.2.1

22 Jan 18:54
6ef5ca4
Compare
Choose a tag to compare

What's Changed

  • Fix more incompatibilities with bazel @ HEAD

This release is compatible with Bazel 6.x LTS, 7.x LTS, and 8.x rolling releases

MODULE.bazel Snippet

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

3.2.0

21 Jan 16:05
813b031
Compare
Choose a tag to compare

What's Changed

  • Avoid failure when shutting down a simulator already in the shutdown state by @ileitch in #2311
  • Update test runner tests to iPhone Xs by @mattrobmattrob in #2312
  • Add validation for platform type attribute in apple_{,static}_xcframework rule by @thii in #2313
  • Fix/support implementation deps in objc library by @xinzhengzhang in #2317
  • Avoid the deprecated --product_type argument for actool actions, use the new arguments for the sticker icons for messages extensions. by @brentleyjones in #2316
  • [Docs] Refresh iOS tutorial by @BalestraPatrick in #2314
  • Fix unbound variable when printing an archive_contents_test failure message by @jszumski in #2319
  • Remove Samuel from OWNERS by @keith in #2321
  • Include dSYMs for any bundled extension targets in the app's xcarchive by @jszumski in #2320
  • Fix dSYM generation for extensions containing spaces in bundle_name by @jszumski in #2323
  • Remove platform_mappings from README.md by @luispadron in #2325
  • Add support to run visionos_application in simulator via bazel run by @BalestraPatrick in #2327
  • Remove subset of valid values from families attribute documentation by @BalestraPatrick in #2326
  • Add swiftinterface_imports to apple_static_xcframework_import by @keith in #2328
  • Support extensions within single-target watchOS apps by @markvasiv in #2309
  • Downgrade last_green to avoid failure by @BalestraPatrick in #2332
  • Update rules_xcodeproj version on ios-app.md by @herlianzhang in #2333
  • Cherry-pick visionOS changes for Xcode 15.1 and more by @BalestraPatrick in #2331
  • Removing --experimental_strict_conflict_checks flag by @sgowroji in #2336
  • Pass launch arguments to simctl launch command by @BalestraPatrick in #2338
  • Fix the test_file location for UITests by @codeman9 in #2349
  • Fix minor issues with module_map rule by @luispadron in #2350
  • Add support for clang modules in experimental_mixed_language_library by @luispadron in #2351
  • Collect data from objc_import by @cpsauer in #2346
  • Added swift_module param in partials to use it in xibs, storyboards and datamodels compilation by @tymurmustafaiev in #2335
  • Fix deprecation warning in imported_dynamic_framework_processor.py by @jszumski in #2334
  • Add support for --attachment_lifetime in ios_xctestrun_runner by @kapoorlakshya in #2347
  • Fix compatibility with --incompatible_objc_provider_remove_linking_info by @keith in #2356
  • Update bazel version support table by @keith in #2358
  • Update rules_swift to avoid objc provider linking removal issues by @keith in #2359
  • Remove more bitcode support by @keith in #2362
  • Avoid looking at install name of a versioned framework if there's only one version by @maxbelanger in #2364
  • Update rules_swift by @keith in #2369
  • Add header_map rule by @luispadron in #2352
  • Add support for headermap to experimental_mixed_language_library by @luispadron in #2372

This release is compatible with Bazel 6.x LTS, 7.x LTS, and 8.x rolling releases

MODULE.bazel Snippet

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

New Contributors

Full Changelog: 3.1.1...3.2.0

3.1.1

19 Oct 21:33
d5d6d58
Compare
Choose a tag to compare

What's Changed

This release is compatible with Bazel 6.x LTS, 7.x LTS, and 8.x rolling releases

MODULE.bazel Snippet

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

3.1.0

19 Oct 21:00
c544011
Compare
Choose a tag to compare

What's Changed

  • Updated apple_support by @brentleyjones in #2260 and #2293
  • Made appintentsmetadataprocessor error with no output by @keith in #2262
  • Added extension_safe to apple_xcframework by @keith in #2261
  • We now correctly add .swiftinterface files to imported dynamic xcframework public_hdrs by @brentleyjones in #2266
  • We now filter out spurious "note:" messages from momc under Xcode 15 by @jszumski in #2276
  • Changed xcarchive ApplicationPath by @maxwellE in #2280
  • Added objc_generate_linkmap to apple_verification_test by @mattrobmattrob in #2284
  • Propagate linkmaps into xcarchives by @maxwellE in #2282
  • Set Python-specific environment variables in xctoolrunner to avoid UTF-8 encoding issues in actions that can return Unicode characters actool and ibtool when the user's environment for Python is not configured for UTF-8 by @brentleyjones in #2287
  • Fixed codesigningtool to work with openssl 3 by @Jichao in #2285
  • Added missing bzl_library dependencies by @brentleyjones in #2292
  • Updated rules_swift by @brentleyjones in #2307

This release is compatible with Bazel 6.x LTS, 7.x LTS, and 8.x rolling releases

MODULE.bazel Snippet

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

3.0.0

20 Sep 21:41
cb695fd
Compare
Choose a tag to compare

What's Changed

  • Use platforms inside Apple rules transitions (overridable with flags), removing the need for platform_mappings with bazel 7.x+
  • Bump xctestrunner for Xcode 15 compatibility
  • Make AppIntentsMetadataProcessor fail if it outputs errors

Below are the changes that were also in previous release candidates.

What's Changed

  • Add initial support for Apple .doccarchive through a new docc_archive rule, thanks @luispadron! See the docs for an example
  • Add initial beta visionOS support. There may be breaking changes as Xcode changes before the initial release
  • Fix issue where iOS CPUs defaulted to x86_64 instead of the current host arch
  • Fix case where xcodebuild was always being used for logic tests, thanks @erikkerber!
  • Fix some cases for upcoming --incompatible_enable_cc_toolchain_resolution flip, thanks @comius!
  • Fix ios_xctestrun_runner failing when using parallel testing with a false positive saying no tests ran, thanks @kapoorlakshya!
  • Ignore more variants of noisy codesigning output
  • Assume target environment is device to ease transition to required platforms that aren't defaulting to using the device constraint
  • Silence output from appintentsmetadataprocessor

Potentially breaking changes

  • A platform_mappings file is now required in some cases (e.g. if you are on a Bazel version older than 7.0.0-pre.20230823.4). 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", 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 = "20da675977cb8249919df14d0ce6165d7b00325fb067f0b06696b893b90a55e8",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/3.0.0/rules_apple.3.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()

3.0.0-rc2

07 Sep 19:51
22d5dd8
Compare
Choose a tag to compare
3.0.0-rc2 Pre-release
Pre-release

What's Changed

  • Add initial support for Apple .doccarchive through a new docc_archive rule, thanks @luispadron! See the docs for an example
  • Add initial beta visionOS support. There may be breaking changes as Xcode changes before the initial release
  • Fix issue where iOS CPUs defaulted to x86_64 instead of the current host arch
  • Fix case where xcodebuild was always being used for logic tests, thanks @erikkerber!
  • Fix some cases for upcoming --incompatible_enable_cc_toolchain_resolution flip, thanks @comius!
  • Fix ios_xctestrun_runner failing when using parallel testing with a false positive saying no tests ran, thanks @kapoorlakshya!
  • Ignore more variants of noisy codesigning output
  • Assume target environment is device to ease transition to required platforms that aren't defaulting to using the device constraint
  • Silence output from appintentsmetadataprocessor

Below are the changes that were also in previous release candidates.

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-rc2", 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 = "2c6ab2f5903a4487f2cf31ec3f2f3a71244ec159dd94c3fde339ee23193df791",
    url = "https://github.com/bazelbuild/rules_apple/releases/download/3.0.0-rc2/rules_apple.3.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()