Buck: apple_asset_catalog()
Support Ukraine. Help Provide Humanitarian Aid to Ukraine.

apple_asset_catalog()

This is liable to change in the future.

An apple_asset_catalog() rule contains resources stored in Apple asset catalog directories. This rule does not have any output on its own and can be built only as a dependency (either direct or transitive) of an apple_bundle() rule, in which case all apple_asset_catalog() rules that the bundle rule depends on are merged and placed into the final output bundle together.

Arguments

  • name (required) #

    The short name for this build target.

  • dirs (defaults to []) #

    Set of paths of Apple asset catalogs contained by this rule. All paths have to end with the .xcassets extension and be compatible with the asset catalog format used by Xcode.

  • app_icon (defaults to None) #

    An optional reference to a .appiconset containing a image set representing an application icon. (The extension itself should not be included.) This parameter may be specified at most once in a given apple_bundle's transitive dependencies.

  • launch_image (defaults to None) #

    An optional reference to a .launchimage containing a image set representing an application launch image. (The extension itself should not be included.) This parameter may be specified at most once in a given apple_bundle's transitive dependencies.

  • visibility (defaults to []) #

    List of build target patterns that identify the build rules that can include this rule as a dependency, for example, by listing it in their deps or exported_deps attributes. For more information, see visibility.

  • licenses (defaults to []) #

    Set of license files for this library. To get the list of license files for a given build rule and all of its dependencies, you can use buck query.

  • labels (defaults to []) #

    Set of arbitrary strings which allow you to annotate a build rule with tags that can be searched for over an entire dependency tree using buck query attrfilter().

Examples

apple_asset_catalog(
  name = 'MyAssetCatalog',
  dirs = [
    'MyResources.xcassets',
  ],
)

# A asset catalog with a app icon and launch image
apple_asset_catalog(
  name = 'AssetCatalog',
  dirs = [ 'AssetCatalog.xcassets' ],
  app_icon = 'Icon',
  launch_image = 'LaunchImage',
)