This file documents other special types used by the Apple Bazel rules.
A struct
containing product type identifiers used by special application and
extension types.
Some applications and extensions, such as Messages Extensions and Sticker Packs in iOS 10, receive special treatment when building (for example, some product types bundle a stub executable instead of a user-defined binary, and some pass extra arguments to tools like the asset compiler). These behaviors are captured in the product type identifier. The product types currently supported are:
Product types | |
---|---|
application |
A basic iOS, macOS, or tvOS application. This is the default product type for those targets; it can be overridden with a more specific product type if needed. |
app_extension |
A basic iOS, macOS, or tvOS application extension. This is the default product type for those targets; it can be overridden with a more specific product type if needed. |
framework |
A basic dynamic framework. This is the default product type for those targets; it does not need to be set explicitly (and cannot be changed). |
messages_application |
Applies to A "stub" application used to distribute a standalone Messages
Extension or Sticker Pack. This application must
include an This product type does not contain a user-provided binary; any code
in its This stub application is not displayed on the home screen and its features are only accessible through the Messages user interface. If you are building a Messages Extension or Sticker Pack as part of a larger application that is launchable, do not use this product type; simply add those extensions to the existing application. |
messages_extension |
Applies to An extension that integrates custom behavior into the Apple Messages application. Such extensions can present a custom user interface in the keyboard area of the app and interact with users' conversations. |
messages_sticker_pack_extension |
Applies to An extension that defines custom sticker packs for the Apple
Messages app. Stickers are provided by including an asset catalog
named This product type does not contain a user-provided binary; any
code in its |
ui_test_bundle |
A UI testing bundle (`.xctest`). This is the default product type for those targets; it does not need to be set explicitly (and cannot be changed). |
unit_test_bundle |
A unit test bundle (`.xctest`). This is the default product type for those targets; it does not need to be set explicitly (and cannot be changed). |
watch2_application |
A watchOS 2+ application. This is the default product type for those targets; it does not need to be set explicitly (and cannot be changed). |
watch2_extension |
A watchOS 2+ application extension. This is the default product type for those targets; it does not need to be set explicitly (and cannot be changed). |
Example usage:
load("@build_bazel_rules_apple//apple:ios.bzl",
"apple_product_type", "ios_application", "ios_extension")
ios_application(
name = "StickerPackApp",
extensions = [":StickerPackExtension"],
product_type = apple_product_type.messages_application,
# other attributes...
)
ios_extension(
name = "StickerPackExtension",
product_type = apple_product_type.messages_sticker_pack_extension,
# other attributes...
)