Having a watch extension or watch app apple_bundle that has an asset_catalog dependency causes the build to fail with error:
BUILD FAILED: Couldn't get dependency ':WatchAppExtensionAssetCatalog#iphonesimulator-x86_64' of target ':WatchAppExtension':
Target :WatchAppExtensionAssetCatalog (type apple_asset_catalog) does not currently support flavors (tried [iphonesimulator-x86_64])
Adding the asset catalog to either of the targets will produce the same error. BUCK is setup as:
apple_bundle(
name = 'WatchAppExtension',
binary = ':WatchAppExtensionBinary',
extension = 'appex',
xcode_product_type = 'com.apple.product-type.watchkit-extension',
info_plist = 'WatchKit Extension/Info.plist',
deps = [
':WatchApp#legacy_watch',
':WatchAppAssetCatalog',
':WatchAppExtensionResources',
],
)
apple_asset_catalog(
name = 'WatchAppExtensionAssetCatalog',
dirs = [ 'WatchKit Extension/Images.xcassets' ],
)
apple_bundle(
name = 'WatchApp',
extension = 'app',
binary = ':WatchAppBinary',
xcode_product_type = 'com.apple.product-type.application.watchapp',
info_plist = 'WatchKit App/Info.plist',
deps = [
':WatchAppAssetCatalog',
':WatchAppResources',
],
)
apple_asset_catalog(
name = 'WatchAppAssetCatalog',
dirs = [ 'WatchKit App/Images.xcassets' ],
)
Adding the asset_catalog as a dependency of the apple_binary instead of the apple_bundle seems to work however.
Most helpful comment
Adding the
asset_catalogas a dependency of theapple_binaryinstead of theapple_bundleseems to work however.