lib/cocoapods-binary/rome/build_framework.rb in cocoapods-binary-0.4.1 vs lib/cocoapods-binary/rome/build_framework.rb in cocoapods-binary-0.4.2
- old
+ new
@@ -22,11 +22,11 @@
target_label = target.label
Pod::UI.puts "Prebuilding #{target_label}..."
other_options = []
if bitcode_enabled
- other_options += ['OTHER_CFLAGS="-fembed-bitcode"']
+ other_options += ['BITCODE_GENERATION_MODE=bitcode']
end
xcodebuild(sandbox, target_label, device, deployment_target, other_options)
xcodebuild(sandbox, target_label, simulator, deployment_target, other_options + ['ARCHS=x86_64', 'ONLY_ACTIVE_ARCH=NO'])
# paths
@@ -51,10 +51,21 @@
simulator_swiftmodule_path = simulator_framwork_path + "/Modules/#{module_name}.swiftmodule"
if File.exist?(device_swiftmodule_path)
FileUtils.cp_r simulator_swiftmodule_path + "/.", device_swiftmodule_path
end
+ # handle the dSYM files
+ device_dsym = "#{device_framwork_path}.dSYM"
+ if File.exist? device_dsym
+ # lipo the simulator dsym
+ tmp_lipoed_binary_path = "#{output_path}/#{module_name}.draft"
+ lipo_log = `lipo -create -output #{tmp_lipoed_binary_path} #{device_dsym}/Contents/Resources/DWARF/#{module_name} #{simulator_framwork_path}.dSYM/Contents/Resources/DWARF/#{module_name}`
+ puts lipo_log unless File.exist?(tmp_lipoed_binary_path)
+ FileUtils.mv tmp_lipoed_binary_path, "#{device_framwork_path}.dSYM/Contents/Resources/DWARF/#{module_name}", :force => true
+ FileUtils.mv device_dsym, output_path, :force => true
+ end
+
# output
output_path.mkpath unless output_path.exist?
FileUtils.mv device_framwork_path, output_path, :force => true
end
@@ -132,6 +143,5 @@
sandbox_root.parent + 'build'
end
end
end
-