blob: f93d6535f5f7cff97e75139ca2047aa58441d3b1 [file] [log] [blame]
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{namespace buck.apple_asset_catalog}
/***/
{template .soyweb}
{call buck.page}
{param title: 'apple_asset_catalog()' /}
{param navid: 'rule_apple_asset_catalog' /}
{param prettify: true /}
{param description}
A rule that is used to bundle Apple asset catalogs.
{/param}
{param content}
{call buck.rule}
{param status: 'UNFROZEN' /}
{param overview}
An <code>apple_asset_catalog()</code> 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 <a href="{ROOT}rule/apple_bundle.html">
<code>apple_bundle()</code> rule</a>, in which case all <code>apple_asset_catalog()</code> rules
that the bundle rule depends on are merged and placed into the final output bundle together.
{/param}
{param args}
{call buck.name_arg /}
{call buck.arg}
{param name: 'dirs' /}
{param default : '[]' /}
{param desc}
Set of paths of Apple asset catalogs contained by this rule. All paths have to end with the <code>
.xcassets</code> extension and be compatible with the asset catalog format used by Xcode.
{/param}
{/call}
{call buck.arg}
{param name: 'app_icon' /}
{param default: 'None' /}
{param desc}
An optional reference to a <code>.appiconset</code> 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 <code>apple_bundle</code>'s transitive dependencies.
{/param}
{/call}
{call buck.arg}
{param name: 'launch_image' /}
{param default: 'None' /}
{param desc}
An optional reference to a <code>.launchimage</code> 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 <code>apple_bundle</code>'s transitive dependencies.
{/param}
{/call}
{/param} // args
{param examples}
{literal}<pre class="prettyprint lang-py">
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',
)
</pre>{/literal}
{/param} // examples
{/call} // buck.rule
{/param}
{/call}
{/template}