Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select device_families by platform_type in precompiled_apple_resource_bundle #924

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion rules/precompiled_apple_resource_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ _FAKE_BUNDLE_PRODUCT_TYPE_BY_PLATFORM_TYPE = {
"watchos": apple_product_type.watch2_application,
}

_DEVICE_FAMILIES_BY_PLATFORM_TYPE = {
"ios": ["iphone", "ipad"],
"macos": ["mac"],
"tvos": ["tv"],
"visionos": ["vision"],
"watchos": ["watch"],
}

def _precompiled_apple_resource_bundle_impl(ctx):
bundle_name = ctx.attr.bundle_name or ctx.label.name

Expand All @@ -37,7 +45,7 @@ def _precompiled_apple_resource_bundle_impl(ctx):
platform_prerequisites = platform_support.platform_prerequisites(
apple_fragment = ctx.fragments.apple,
config_vars = ctx.var,
device_families = ["iphone", "ipad"],
device_families = _DEVICE_FAMILIES_BY_PLATFORM_TYPE[platform_type],
luispadron marked this conversation as resolved.
Show resolved Hide resolved
explicit_minimum_os = None,
explicit_minimum_deployment_os = None,
objc_fragment = None,
Expand Down