Skip to content

Commit

Permalink
Add required Info plist keys in starlark tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maustinstar committed May 1, 2023
1 parent bf0f818 commit 2297b88
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 14 deletions.
1 change: 1 addition & 0 deletions apple/internal/resources.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def _get_attr_as_list(*, attr, nested_attr, split_attr_keys):
attr = attr,
nested_attr = nested_attr,
))

else:
# Search the attribute within each split key if any split keys were defined.
for split_attr_key in split_attr_keys:
Expand Down
11 changes: 11 additions & 0 deletions test/starlark_tests/resources/Info-extensionkit.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EXAppExtensionAttributes</key>
<dict>
<key>EXExtensionPointIdentifier</key>
<string>com.apple.app-intents</string>
</dict>
</dict>
</plist>
11 changes: 11 additions & 0 deletions test/starlark_tests/resources/Info-nsextension.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.widgetkit-extension</string>
</dict>
</dict>
</plist>
21 changes: 21 additions & 0 deletions test/starlark_tests/resources/WatchosExtensionKitInfo.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>EXAppExtensionAttributes</key>
<dict>
<key>EXExtensionPointIdentifier</key>
<string>com.apple.app-intents</string>
</dict>
</dict>
</plist>
11 changes: 11 additions & 0 deletions test/starlark_tests/targets_under_test/ios/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ ios_extension(
frameworks = [":fmwk_min_os_baseline"],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_ios.nplus1,
tags = common.fixture_tags,
Expand Down Expand Up @@ -1098,6 +1099,7 @@ ios_extension(
],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_ios.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -1117,6 +1119,7 @@ ios_extension(
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Another.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_ios.baseline,
tags = common.fixture_tags,
Expand All @@ -1138,6 +1141,7 @@ ios_extension(
],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_ios.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -1157,6 +1161,7 @@ ios_extension(
],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_ios.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand Down Expand Up @@ -1263,6 +1268,7 @@ ios_extension(
],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-extensionkit.plist",
],
minimum_os_version = common.min_os_ios.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -1283,6 +1289,7 @@ ios_extension(
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Another.plist",
"//test/starlark_tests/resources:Info-extensionkit.plist",
],
minimum_os_version = common.min_os_ios.baseline,
tags = common.fixture_tags,
Expand All @@ -1305,6 +1312,7 @@ ios_extension(
],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-extensionkit.plist",
],
minimum_os_version = common.min_os_ios.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -1325,6 +1333,7 @@ ios_extension(
],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-extensionkit.plist",
],
minimum_os_version = common.min_os_ios.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand Down Expand Up @@ -3630,6 +3639,7 @@ ios_extension(
],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_ios.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand Down Expand Up @@ -3813,6 +3823,7 @@ ios_extension(
families = ["iphone"],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_ios.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand Down
2 changes: 2 additions & 0 deletions test/starlark_tests/targets_under_test/macos/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ macos_extension(
bundle_id = "com.google.example.ext",
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_macos.baseline,
tags = common.fixture_tags,
Expand Down Expand Up @@ -240,6 +241,7 @@ macos_extension(
extensionkit_extension = True,
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-extensionkit.plist",
],
minimum_os_version = common.min_os_macos.baseline,
tags = common.fixture_tags,
Expand Down
13 changes: 11 additions & 2 deletions test/starlark_tests/targets_under_test/tvos/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ tvos_extension(
entitlements = "//test/starlark_tests/resources:entitlements.plist",
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_tvos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -115,7 +116,10 @@ tvos_extension(
name = "swift_ext",
bundle_id = "com.google.example.ext",
entitlements = "//test/starlark_tests/resources:entitlements.plist",
infoplists = ["//test/starlark_tests/resources:Info.plist"],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_tvos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
tags = common.fixture_tags,
Expand Down Expand Up @@ -148,6 +152,7 @@ tvos_extension(
extensionkit_extension = True,
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-extensionkit.plist",
],
minimum_os_version = common.min_os_tvos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -173,7 +178,10 @@ tvos_extension(
bundle_id = "com.google.example.exappextension",
entitlements = "//test/starlark_tests/resources:entitlements.plist",
extensionkit_extension = True,
infoplists = ["//test/starlark_tests/resources:Info.plist"],
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-extensionkit.plist",
],
minimum_os_version = common.min_os_tvos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
tags = common.fixture_tags,
Expand Down Expand Up @@ -1001,6 +1009,7 @@ tvos_extension(
entitlements = "//test/starlark_tests/resources:entitlements.plist",
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_tvos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand Down
22 changes: 12 additions & 10 deletions test/starlark_tests/targets_under_test/watchos/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ watchos_extension(
entitlements = "//test/starlark_tests/resources:entitlements.plist",
extensionkit_extension = True,
infoplists = [
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
minimum_os_version = common.min_os_watchos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -312,7 +312,7 @@ watchos_extension(
extensionkit_extension = True,
frameworks = [":fmwk"],
infoplists = [
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
minimum_os_version = common.min_os_watchos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -332,7 +332,7 @@ watchos_extension(
":second_fmwk_with_provisioning",
],
infoplists = [
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
ipa_post_processor = "//test/starlark_tests/targets_under_test/apple:ipa_post_processor_verify_codesigning",
minimum_os_version = common.min_os_watchos.baseline,
Expand All @@ -350,7 +350,7 @@ watchos_extension(
extensionkit_extension = True,
frameworks = [":fmwk_with_fmwk_with_provisioning"],
infoplists = [
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
ipa_post_processor = "//test/starlark_tests/targets_under_test/apple:ipa_post_processor_verify_codesigning",
minimum_os_version = common.min_os_watchos.baseline,
Expand All @@ -368,7 +368,7 @@ watchos_extension(
extensionkit_extension = True,
frameworks = [":fmwk_with_fmwk"],
infoplists = [
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
minimum_os_version = common.min_os_watchos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -384,7 +384,7 @@ watchos_extension(
entitlements = "//test/starlark_tests/resources:entitlements.plist",
extensionkit_extension = True,
infoplists = [
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
ipa_post_processor = "//test/starlark_tests/targets_under_test/apple:ipa_post_processor_verify_codesigning",
minimum_os_version = common.min_os_watchos.baseline,
Expand All @@ -402,7 +402,7 @@ watchos_extension(
extensionkit_extension = True,
frameworks = [":fmwk_with_imported_static_framework"],
infoplists = [
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
ipa_post_processor = "//test/starlark_tests/targets_under_test/apple:ipa_post_processor_verify_codesigning",
minimum_os_version = common.min_os_watchos.baseline,
Expand All @@ -418,7 +418,7 @@ watchos_extension(
extensionkit_extension = True,
infoplists = [
"//test/starlark_tests/resources:Another.plist",
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
minimum_os_version = common.min_os_watchos.baseline,
tags = common.fixture_tags,
Expand All @@ -429,7 +429,7 @@ watchos_extension(
bundle_id = "com.google.example.exappextension",
extensionkit_extension = True,
infoplists = [
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
minimum_os_version = common.min_os_watchos.arm64_support,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand Down Expand Up @@ -652,6 +652,7 @@ watchos_extension(
entitlements = "//test/starlark_tests/resources:entitlements.plist",
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-nsextension.plist",
],
minimum_os_version = common.min_os_watchos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand Down Expand Up @@ -718,6 +719,7 @@ watchos_extension(
extensionkit_extension = True,
infoplists = [
"//test/starlark_tests/resources:Info.plist",
"//test/starlark_tests/resources:Info-extensionkit.plist",
],
minimum_os_version = common.min_os_watchos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand All @@ -735,7 +737,7 @@ watchos_extension(
extensionkit_extension = True,
extensions = [":watchos_exappextension"],
infoplists = [
"//test/starlark_tests/resources:WatchosExtensionInfo.plist",
"//test/starlark_tests/resources:WatchosExtensionKitInfo.plist",
],
minimum_os_version = common.min_os_watchos.baseline,
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
Expand Down
3 changes: 1 addition & 2 deletions test/starlark_tests/watchos_extensionkit_extension_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ def watchos_extensionkit_extension_test_suite(name):
"DTXcode": "*",
"DTXcodeBuild": "*",
"MinimumOSVersion": common.min_os_watchos.baseline,
"NSExtension:NSExtensionAttributes:WKAppBundleIdentifier": "com.google.example",
"NSExtension:NSExtensionPointIdentifier": "com.apple.watchkit",
"EXAppExtensionAttributes:EXExtensionPointIdentifier": "com.apple.app-intents",
"UIDeviceFamily:0": "4",
},
tags = [name],
Expand Down

0 comments on commit 2297b88

Please sign in to comment.