-
Notifications
You must be signed in to change notification settings - Fork 267
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
Add bundle_id to apple_resource_bundle rule or support Info.plist variable substitution for PRODUCT_BUNDLE_IDENTIFIER #679
Comments
We're currently having to workaround this by editing the generated Info.plist every time we add a new resource bundle target. |
As a workaround, you can use a script that uses ios_application(
...
ipa_post_processor = ":plist_generate",
...
)
sh_binary(
name = "plist_generate",
srcs = ["plist_generate.sh"],
) #!/bin/bash
set -euo pipefail
archive_root_path=${1}
framework_path=$(find ${archive_root_path} -type d -name '*.framework')
framework_name=$(basename ${framework_path%.framework*})
# Read the stamps to get the version
eval $(cat bazel-out/stable-status.txt bazel-out/volatile-status.txt | sed 's/ /=/')
plutil -convert binary1 -o "${framework_path}/Info.plist" - <<EOF
{
"CFBundleExecutable": "${framework_name}",
"CFBundlePackageType": "FMWK",
"CFBundleShortVersionString": "${STABLE_VERSION}",
"MinimumOSVersion": "11.0",
"CFBundleSupportedPlatforms": [
"iPhoneOS",
"iPhoneSimulator",
],
}
EOF |
Looks like this has been resolved by #1182. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Info.plist
file comes with a resource bundle target out of the box coming from Xcode by default has aPRODUCT_BUNDLE_IDENTIFIER
variable. Although bundle ID isn't needed for resource bundles (according to Bazel) it would be nice to make this work for the default targets that get generated by Xcode.The text was updated successfully, but these errors were encountered: