Skip to content

Commit 9f40c5d

Browse files
committed
Merge branch '0.4.2'
2 parents 012c326 + 0cfa27a commit 9f40c5d

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed

lib/cocoapods-binary/Integration.rb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,32 @@ def empty_source_files(spec)
212212
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
213213
end
214214

215+
# to remove the resurce bundle target.
216+
# When specify the "resource_bundles" in podspec, xcode will generate a bundle
217+
# target after pod install. But the bundle have already built when the prebuit
218+
# phase and saved in the framework folder. We will treat it as a normal resource
219+
# file.
220+
# https://github.com/leavez/cocoapods-binary/issues/29
221+
if spec.attributes_hash["resource_bundles"]
222+
bundle_names = spec.attributes_hash["resource_bundles"].keys
223+
spec.attributes_hash["resource_bundles"] = nil
224+
spec.attributes_hash["resources"] ||= []
225+
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
226+
end
227+
228+
# to remove the resurce bundle target.
229+
# When specify the "resource_bundles" in podspec, xcode will generate a bundle
230+
# target after pod install. But the bundle have already built when the prebuit
231+
# phase and saved in the framework folder. We will treat it as a normal resource
232+
# file.
233+
# https://github.com/leavez/cocoapods-binary/issues/29
234+
if spec.attributes_hash["resource_bundles"]
235+
bundle_names = spec.attributes_hash["resource_bundles"].keys
236+
spec.attributes_hash["resource_bundles"] = nil
237+
spec.attributes_hash["resources"] ||= []
238+
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
239+
end
240+
215241
# to avoid the warning of missing license
216242
spec.attributes_hash["license"] = {}
217243
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module CocoapodsBinary
2-
VERSION = "0.4.1"
2+
VERSION = "0.4.2"
33
end

lib/cocoapods-binary/helper/podfile_options.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class TargetDefinition
1111

1212
## --- option for setting using prebuild framework ---
1313
def parse_prebuild_framework(name, requirements)
14-
1514
should_prebuild = Pod::Podfile::DSL.prebuild_all
1615

1716
options = requirements.last

lib/cocoapods-binary/rome/build_framework.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ def build_for_iosish_platform(sandbox,
2525

2626
other_options = []
2727
if bitcode_enabled
28-
other_options += ['OTHER_CFLAGS="-fembed-bitcode"']
2928
other_options += ['BITCODE_GENERATION_MODE=bitcode']
3029
end
3130
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', 'DEBUG_INFORMATION_FORMAT=dwarf'])
31+
xcodebuild(sandbox, target_label, simulator, deployment_target, other_options + ["ARCHS=#{simulator_default_arch}",'ONLY_ACTIVE_ARCH=NO'])
3332

3433
# paths
3534
target_name = target.name # equals target.label, like "AFNeworking-iOS" when AFNetworking is used in multiple platforms.
@@ -58,11 +57,11 @@ def build_for_iosish_platform(sandbox,
5857
# handle the dSYM files
5958
device_dsym = "#{device_framwork_path}.dSYM"
6059
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
60+
# lipo the simulator dsym
61+
tmp_lipoed_binary_path = "#{output_path}/#{module_name}.draft"
62+
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}`
63+
puts lipo_log unless File.exist?(tmp_lipoed_binary_path)
64+
FileUtils.mv tmp_lipoed_binary_path, "#{device_framwork_path}.dSYM/Contents/Resources/DWARF/#{module_name}", :force => true
6665
FileUtils.mv device_dsym, output_path, :force => true
6766
end
6867

0 commit comments

Comments
 (0)