Skip to content

Commit

Permalink
Fix ios_extension with resources (#2439)
Browse files Browse the repository at this point in the history
  • Loading branch information
jszumski committed Mar 28, 2024
1 parent 9c6eb04 commit c00a35f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions apple/internal/ios_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,7 @@ def _ios_extension_impl(ctx):
attr = ctx.attr,
res_attrs = [
"app_icons",
"resources",
"strings",
],
)
Expand Down
11 changes: 11 additions & 0 deletions test/starlark_tests/ios_extension_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,17 @@ def ios_extension_test_suite(name):
tags = [name],
)

# Test ext with resources bundles them at the top level
archive_contents_test(
name = "{}_contains_resources_test".format(name),
build_type = "simulator",
target_under_test = "//test/starlark_tests/targets_under_test/ios:ext_with_resources",
contains = [
"$BUNDLE_ROOT/additional.txt",
],
tags = [name],
)

# Test dSYM binaries and linkmaps from framework embedded via 'data' are propagated correctly
# at the top-level ios_extension rule, and present through the 'dsysms' and 'linkmaps' output
# groups.
Expand Down
25 changes: 25 additions & 0 deletions test/starlark_tests/targets_under_test/ios/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4905,3 +4905,28 @@ docc_archive(
fallback_bundle_version = "1.0",
fallback_display_name = "BasicFramework",
)

# ---------------------------------------------------------------------------------------
# Target for extension resource bundling.

ios_extension(
name = "ext_with_resources",
bundle_id = "com.google.example.ext_with_resources",
entitlements = "//test/starlark_tests/resources:entitlements.plist",
families = [
"iphone",
"ipad",
],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
],
minimum_os_version = common.min_os_ios.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
resources = [
"//test/starlark_tests/resources:additional.txt",
],
tags = common.fixture_tags,
deps = [
"//test/starlark_tests/resources:objc_main_lib",
],
)

0 comments on commit c00a35f

Please sign in to comment.