@@ -79,6 +79,33 @@ Found the following: {icon_bundle_files}
7979
8080""" .format (icon_bundle_files = icon_bundle_files ))
8181
82+ def _validate_sticker_pack_icon_sets (* , icon_bundle_files , stickers_icon_files , xcasset_appicon_files ):
83+ """Validates that the asset files contain only sticker icon sets."""
84+ message = ("Sticker pack extensions must use Sticker Icon Sets " +
85+ "(named .stickersiconset), not traditional App Icon Sets" )
86+ bundling_support .ensure_single_xcassets_type (
87+ extension = "stickersiconset" ,
88+ files = stickers_icon_files ,
89+ message = message ,
90+ xcassets_extension = "xcstickers" ,
91+ )
92+
93+ # Check that there are no .appiconset files, which are not allowed for messages extensions.
94+ bundling_support .ensure_asset_catalog_files_not_in_xcassets (
95+ extension = "appiconset" ,
96+ files = xcasset_appicon_files ,
97+ message = message ,
98+ xcassets_extension = "xcstickers" ,
99+ )
100+
101+ if icon_bundle_files :
102+ fail ("""
103+ Icon Composer .icon bundles are not supported for Messages Extensions.
104+
105+ Found the following: {icon_bundle_files}
106+
107+ """ .format (icon_bundle_files = icon_bundle_files ))
108+
82109def _validate_tvos_icon_sets (* , brandassets_icon_files , icon_bundle_files , xcasset_appicon_files ):
83110 """Validates that the asset files contain only tvOS brand assets."""
84111 message = ("tvOS apps must use tvOS brand assets (named .brandassets), " +
@@ -198,6 +225,15 @@ def _icon_info_from_asset_files(
198225 stickers_icon_files = icon_files ,
199226 xcasset_appicon_files = xcasset_appicon_files ,
200227 )
228+ elif product_type == apple_product_type .messages_sticker_pack_extension :
229+ appicon_extension = "stickersiconset"
230+ icon_files = [f for f in asset_files if ".stickersiconset/" in f .path ]
231+ _validate_sticker_pack_icon_sets (
232+ icon_bundle_files = icon_bundle_files ,
233+ stickers_icon_files = icon_files ,
234+ xcasset_appicon_files = xcasset_appicon_files ,
235+ )
236+
201237 elif platform_type == "tvos" :
202238 appicon_extension = "brandassets"
203239 icon_files = [f for f in asset_files if ".brandassets/" in f .path ]
@@ -298,7 +334,10 @@ def _args_for_app_icons(
298334 product_type ):
299335 """Returns arguments for app icons."""
300336 args = []
301- if product_type == apple_product_type .messages_extension :
337+ if product_type in [
338+ apple_product_type .messages_extension ,
339+ apple_product_type .messages_sticker_pack_extension ,
340+ ]:
302341 args .extend ([
303342 "--include-sticker-content" ,
304343 "--stickers-icon-role" ,
0 commit comments