Skip to content

Commit 8eae79f

Browse files
committed
copy dsym files when building framwork
1 parent 30cbf7f commit 8eae79f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lib/cocoapods-binary/rome/build_framework.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def build_for_iosish_platform(sandbox,
2727
other_options += ['BITCODE_GENERATION_MODE=bitcode']
2828
end
2929
xcodebuild(sandbox, target_label, device, deployment_target, other_options)
30-
xcodebuild(sandbox, target_label, simulator, deployment_target, other_options + ['ARCHS=x86_64', 'ONLY_ACTIVE_ARCH=NO'])
30+
xcodebuild(sandbox, target_label, simulator, deployment_target, other_options + ['ARCHS=x86_64', 'ONLY_ACTIVE_ARCH=NO', 'DEBUG_INFORMATION_FORMAT=dwarf'])
3131

3232
# paths
3333
root_name = target.pod_name
@@ -53,6 +53,17 @@ def build_for_iosish_platform(sandbox,
5353
FileUtils.cp_r simulator_swiftmodule_path + "/.", device_swiftmodule_path
5454
end
5555

56+
# handle the dSYM files
57+
device_dsym = "#{device_framwork_path}.dSYM"
58+
if File.exist? device_dsym
59+
## lipo the simulator dsym
60+
# tmp_lipoed_binary_path = "#{output_path}/#{module_name}.draft"
61+
# lipo_log = `lipo -create -output #{tmp_lipoed_binary_path} #{device_framwork_path}.dSYM/Contents/Resources/DWARF/#{module_name} #{simulator_framwork_path}.dSYM/Contents/Resources/DWARF/#{module_name}`
62+
# puts lipo_log unless File.exist?(tmp_lipoed_binary_path)
63+
# FileUtils.mv tmp_lipoed_binary_path, "#{device_framwork_path}.dSYM/Contents/Resources/DWARF/#{module_name}", :force => true
64+
FileUtils.mv device_dsym, output_path, :force => true
65+
end
66+
5667
# output
5768
output_path.mkpath unless output_path.exist?
5869
FileUtils.mv device_framwork_path, output_path, :force => true

0 commit comments

Comments
 (0)