-
Notifications
You must be signed in to change notification settings - Fork 268
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
Substitute resource bundle's PRODUCT_BUNDLE_IDENTIFIER with a generated bundle ID #681
Conversation
IMO unless this value is something super stable for access with the NSBundle API it's nicer to have users set this by relying on other substituted variables like TARGET_NAME which is what we do |
This definitely feels wrong because it puts every bundle into the build.bazel namespace when used. The chances for collisions also seems like it could be pretty high. |
How about adding a bundle_id attribute? |
e942040
to
19e10e5
Compare
bundle ID The Info.plist file in resource bundle targets generated by Xcode contains a PRODUCT_BUNDLE_IDENTIFIER variable even though it doesn't seem necessary. We generate a bundle ID for each target and substitute this variable to that, so that we can build resource bundles coming from Xcode without having to modify the Info.plist file.
19e10e5
to
974410a
Compare
Adding a Users will still be able to set this themselves by hard-coding the bundle id. |
Just hit an issue that brought me here :) A |
This is a bit misleading, what is required is the I'm super wary about a change like this because these values changing, or being inferred in an unexpected way will lead to runtime crashes. The current recommendation for how to deal with this is use a different replacement to create a stable identifier that you choose, such as by doing this in your plist:
|
I agree that adding this default is potentially dangerous -- but I do think a change adding a |
We pre-process our plists now so this isn't needed anymore. |
The Info.plist file in resource bundle targets generated by Xcode
contains a PRODUCT_BUNDLE_IDENTIFIER variable even though it doesn't seem
necessary. We generate a bundle ID for each target and substitute this
variable to that, so that we can build resource bundles coming from Xcode
without having to modify the Info.plist file.
Resolves #679.