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

plisttool failes on unknown variable reference $PRODUCT_BUNDLE_PACKAGE_TYPE #643

Closed
ghost opened this issue Oct 27, 2019 · 5 comments
Closed
Labels
type: feature request New feature or request

Comments

@ghost
Copy link

ghost commented Oct 27, 2019

Description

A new Info.plist variable has been defined recently here and ios_application rule failes on Info.plist that includes it.

I am new to Apple and rules_apple, so not sure how to workaround it or contribute a fix. But if I figure, I will try to contribute. If I can have a mentor, I am happy to help as well.

Environemnt

...
	<key>CFBundlePackageType</key>
	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
...

Expected behaviour

Build runs without a problem

Observed error

ERROR: In target "//test_app:app"; unknown variable reference "$(PRODUCT_BUNDLE_PACKAGE_TYPE)" while merging plists (key: "CFBundlePackageType", value: "$(PRODUCT_BUNDLE_PACKAGE_TYPE)").
@ghost
Copy link
Author

ghost commented Oct 27, 2019

Took a Info.plist file from a default generated project from xcode 11.1.0 . Not sure if CFBundlePackageType key value pair is important property for rules_apple.

@keith
Copy link
Member

keith commented Oct 27, 2019

A quick fix for this on your side would be to change your plist to hardcode the right value. It would be useful to know what this is used for and what the possible values are.

@thomasvl
Copy link
Member

I believe we do document all the subs we support: https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#variable-substitution

Looks like it might be something completely new in Xcode 11 - https://forums.developer.apple.com/thread/123573

@ethanyanjiali
Copy link

This comes by default in XCode 12, I end up deleting

<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>

@brentleyjones
Copy link
Collaborator

Looks like we fixed this with #891. Please reopen if that's not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants