lib/cocoapods-rome/post_install.rb in cocoapods-rome-0.2.0 vs lib/cocoapods-rome/post_install.rb in cocoapods-rome-0.3.0

- old
+ new

@@ -22,11 +22,11 @@ target_label = target.cocoapods_target_label if target.platform_name == :ios xcodebuild(sandbox, target_label, DEVICE) xcodebuild(sandbox, target_label, SIMULATOR) - spec_names = target.specs.map { |spec| spec.root.name }.uniq + spec_names = target.specs.map { |spec| spec.root.module_name }.uniq spec_names.each do |root_name| executable_path = "#{build_dir}/#{root_name}" device_lib = "#{build_dir}/#{CONFIGURATION}-#{DEVICE}/#{target_label}/#{root_name}.framework/#{root_name}" device_framework_lib = File.dirname(device_lib) simulator_lib = "#{build_dir}/#{CONFIGURATION}-#{SIMULATOR}/#{target_label}/#{root_name}.framework/#{root_name}" @@ -36,9 +36,11 @@ lipo_log = `lipo -create -output #{executable_path} #{device_lib} #{simulator_lib}` puts lipo_log unless File.exist?(executable_path) FileUtils.mv executable_path, device_lib FileUtils.mv device_framework_lib, build_dir + FileUtils.rm simulator_lib if File.file?(simulator_lib) + FileUtils.rm device_lib if File.file?(device_lib) end else xcodebuild(sandbox, target_label) end end