Each Apple platform has its own rules for building bundles (applications, extensions, and frameworks) and for running unit tests and UI tests.
Platform | .bzl file |
Bundling rules | Testing rules |
---|---|---|---|
iOS | @build_bazel_rules_apple//apple:ios.bzl |
ios_app_clip ios_application ios_dynamic_framework ios_extension ios_framework ios_imessage_application ios_imessage_extension ios_static_framework ios_sticker_pack_extension |
ios_build_test ios_ui_test_suite ios_ui_test ios_unit_test_suite ios_unit_test ios_xctestrun_runner |
macOS | @build_bazel_rules_apple//apple:macos.bzl |
macos_application macos_bundle macos_command_line_application macos_extension |
macos_build_test macos_unit_test |
tvOS | @build_bazel_rules_apple//apple:tvos.bzl |
tvos_application tvos_dynamic_framework tvos_extension tvos_framework tvos_static_framework |
tvos_build_test tvos_ui_test tvos_unit_test |
watchOS | @build_bazel_rules_apple//apple:watchos.bzl |
watchos_application watchos_dynamic_framework watchos_extension watchos_framework watchos_static_framework |
watchos_build_test watchos_ui_test watchos_unit_test |
General rules that are not specific to a particular Apple platform are listed below.
Category | .bzl file |
Rules |
---|---|---|
General | ||
@build_bazel_rules_apple//apple:apple.bzl |
apple_dynamic_framework_import apple_dynamic_xcframework_import apple_static_framework_import apple_static_library apple_static_xcframework_import apple_static_xcframework apple_universal_binary apple_xcframework local_provisioning_profile provisioning_profile_repository_extension provisioning_profile_repository |
|
@build_bazel_rules_apple//apple:docc.bzl |
docc_archive
|
|
@build_bazel_rules_apple//apple:header_map.bzl |
header_map
|
|
@build_bazel_rules_apple//apple:xcarchive.bzl |
xcarchive |
|
@build_bazel_rules_apple//apple:versioning.bzl |
apple_bundle_version |
|
Resources | @build_bazel_rules_apple//apple:resources.bzl |
apple_bundle_import apple_core_data_model apple_core_ml_library apple_precompiled_resource_bundle apple_resource_bundle apple_resource_group swift_apple_core_ml_library swift_intent_library |
If you want to write custom rules that integrate with these Apple platform rules (for example, write a rule that provides resources to an application or takes an application as a dependency), then please refer to the documentation on providers to see the data that these rules propagate as output and expect as input.