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

BCSymbolMaps preserve and copy to archive #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions lib/cocoapods-binary/Integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ def add_vendered_framework(spec, platform, added_framework_file_path)
vendored_frameworks = [vendored_frameworks] if vendored_frameworks.kind_of?(String)
vendored_frameworks += [added_framework_file_path]
spec.attributes_hash[platform]["vendored_frameworks"] = vendored_frameworks

preserve_paths = spec.attributes_hash[platform]["preserve_paths"] || []
preserve_paths = [preserve_paths] if preserve_paths.kind_of?(String)
preserve_paths += ["**/*.bcsymbolmap"]
spec.attributes_hash[platform]["preserve_paths"] = preserve_paths
end
def empty_source_files(spec)
spec.attributes_hash["source_files"] = []
Expand Down
14 changes: 12 additions & 2 deletions lib/cocoapods-binary/rome/build_framework.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ def build_for_iosish_platform(sandbox,
# paths
target_name = target.name # equals target.label, like "AFNeworking-iOS" when AFNetworking is used in multiple platforms.
module_name = target.product_module_name
device_framework_path = "#{build_dir}/#{CONFIGURATION}-#{device}/#{target_name}/#{module_name}.framework"
simulator_framework_path = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{target_name}/#{module_name}.framework"

device_results_path = "#{build_dir}/#{CONFIGURATION}-#{device}/#{target_name}"
device_framework_path = "#{device_results_path}/#{module_name}.framework"

simulator_results_path = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{target_name}"
simulator_framework_path = "#{simulator_results_path}/#{module_name}.framework"

device_binary = device_framework_path + "/#{module_name}"
simulator_binary = simulator_framework_path + "/#{module_name}"
Expand Down Expand Up @@ -84,6 +88,12 @@ def build_for_iosish_platform(sandbox,
File.write(device_generated_swift_header_path, combined_header_content.strip)
end

# Preserve bcsymbolmap files
bcsymbolmap_output_path = "#{output_path}/"
FileUtils.mkdir_p(bcsymbolmap_output_path) unless File.exists?(bcsymbolmap_output_path)
FileUtils.mv Dir.glob("#{device_results_path}/*.bcsymbolmap"), "#{bcsymbolmap_output_path}/", :force => true
FileUtils.mv Dir.glob("#{simulator_results_path}/*.bcsymbolmap"), "#{bcsymbolmap_output_path}/", :force => true

# handle the dSYM files
device_dsym = "#{device_framework_path}.dSYM"
if File.exist? device_dsym
Expand Down