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

Add RemoveHeadersOnCopy attribute for build files in copy files build phases #886

Conversation

marciniwanicki
Copy link
Collaborator

@marciniwanicki marciniwanicki commented Jan 13, 2020

Short description πŸ“

While working on bloomberg/xcdiff#40, we discovered that some of the build files have missing RemoveHeadersOnCopy attribute. The attribute determines if the headers should be striped from the archive, and if not set, can lead to headers leakage. The attribute is not visible in the Xcode UI, but added automatically every time a certain bundle types are added to a copy files build phase (i.e. .framework, .appex).
Oddly the attribute is not added for .xcframework, but it's probably an Xcode issue (I will fill a radar).

Solution πŸ“¦

Added "RemoveHeadersOnCopy" attribute for build files in embed precompiled frameworks, embed watch content, and embed app extensions build phases.

Implementation πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

  • Update TuistGenerator to add RemoveHeadersOnCopy
  • Update acceptance tests
  • Update CHANGELOG

@marciniwanicki marciniwanicki requested a review from a team January 13, 2020 14:17
@ghost ghost requested review from kwridan and pepicrft and removed request for a team January 13, 2020 14:17
Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘ Thanks for adding those acceptance tests

@marciniwanicki marciniwanicki merged commit 8a4b657 into tuist:master Jan 13, 2020
@marciniwanicki marciniwanicki deleted the feautre/add-RemoveHeadersOnCopy-flag-if-needed branch January 13, 2020 17:23
@CFKevinRef
Copy link

Update: It seems that RemoveHeadersOnCopy is added when embedding an XCFramework in Xcode 12 via the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants