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

[SR-6196] New Build System incorrect substitutes variables in Info.plist #791

Closed
swift-ci opened this issue Oct 20, 2017 · 1 comment
Closed

Comments

@swift-ci
Copy link

Previous ID SR-6196
Radar None
Original Reporter st3fan (JIRA User)
Type Bug
Status Resolved
Resolution Invalid
Environment

Xcode 9.0.1 with the New Build System enabled.

This project where this happens is open source and can be found at https://github.com/mozilla-mobile/firefox-ios

We are happy to assist with more details.

Additional Detail from JIRA
Votes 0
Component/s llbuild
Labels Bug
Assignee None
Priority Medium

md5: 4cad5e8fa310acd30538a0f8adc85a81

Issue Description:

This one took us a few days to narrow down unfortunately.

With the new build system enabled, the following in the Info.plist ...

{{ <key>NSExtension</key>}}
{{ <dict>}}
{{ <key>NSExtensionAttributes</key>}}
{{ <dict>}}
{{ <key>NSExtensionActivationRule</key>}}
{{ <string>SUBQUERY ( extensionItems, $extensionItem, SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url").@count == 1 ).@count == 1</string>}}

... will be transformed to ...

<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY ( extensionItems, $extensionItem, SUBQUERY ( , , ANY UTI-CONFORMS-TO "public.url").@count == 1 ).@count == 1</string>

The problem being that the New Build System substitutes $IDENTIFIER whereas the Old Build System would only do that for $(IDENTIFIER).

Because of the moment in the build where this happens, there is no workaround. We tried entity encoding the $ and putting things in a CDATA section, but that did not work.

We switched back to the Old Build System and this problem went away.

If we visit Cupertino, do we get some stickers as a reward? 🙂

@belkadan
Copy link

Sorry, llbuild is just the low-level piece of the build system; the part that's messing up your Info.plist is still part of Xcode. Please file an issue at https://bugreport.apple.com instead.

I'm afraid we don't have enough stickers for everyone, but there are some good shirts at the store at 1 Infinite Loop. :-)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants