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

[Infra] Embed static frameworks with proper settings #1580

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/add_framework_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ def add_ref(group, path, source_tree, phase_list)
ref.name = "#{File.basename(path)}"
ref.source_tree = source_tree
phase_list.each do |phase|
phase.add_file_reference(ref)
build_file = phase.add_file_reference(ref)
# In Xcode 15+, the following settings should be applied when embedding
# static frameworks. This will will enable Xcode to strip out the
# framework's static archive and headers, so that only the framework's
# resources remain.
if phase.isa == 'PBXCopyFilesBuildPhase' && phase.name == "Embed Frameworks"
build_file.settings = { 'ATTRIBUTES' => ['CodeSignOnCopy', 'RemoveHeadersOnCopy'] }
end
end
puts ref
end
Expand Down
Loading