@@ -29,7 +29,7 @@ def build_for_iosish_platform(sandbox,
2929 other_options += [ 'BITCODE_GENERATION_MODE=bitcode' ]
3030 end
3131 xcodebuild ( sandbox , target_label , device , deployment_target , other_options )
32- xcodebuild ( sandbox , target_label , simulator , deployment_target , other_options + [ "ARCHS=#{ simulator_default_arch } " , 'ONLY_ACTIVE_ARCH=NO' ] )
32+ xcodebuild ( sandbox , target_label , simulator , deployment_target , other_options + [ "ARCHS=#{ simulator_default_arch } " , 'ONLY_ACTIVE_ARCH=NO' , 'DEBUG_INFORMATION_FORMAT=dwarf' ] )
3333
3434 # paths
3535 target_name = target . name # equals target.label, like "AFNeworking-iOS" when AFNetworking is used in multiple platforms.
@@ -55,6 +55,17 @@ def build_for_iosish_platform(sandbox,
5555 FileUtils . cp_r simulator_swiftmodule_path + "/." , device_swiftmodule_path
5656 end
5757
58+ # handle the dSYM files
59+ device_dsym = "#{ device_framwork_path } .dSYM"
60+ if File . exist? device_dsym
61+ ## lipo the simulator dsym
62+ # tmp_lipoed_binary_path = "#{output_path}/#{module_name}.draft"
63+ # 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}`
64+ # puts lipo_log unless File.exist?(tmp_lipoed_binary_path)
65+ # FileUtils.mv tmp_lipoed_binary_path, "#{device_framwork_path}.dSYM/Contents/Resources/DWARF/#{module_name}", :force => true
66+ FileUtils . mv device_dsym , output_path , :force => true
67+ end
68+
5869 # output
5970 output_path . mkpath unless output_path . exist?
6071 FileUtils . mv device_framwork_path , output_path , :force => true
0 commit comments