Skip to content

Commit 75f0ae9

Browse files
committed
Merge pull request #45 from leavez/fix#29
Fix #29
1 parent 671ebdd commit 75f0ae9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/cocoapods-binary/Integration.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,19 @@ def remove_target_files_if_needed
180180
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
181181
end
182182

183+
# to remove the resurce bundle target.
184+
# When specify the "resource_bundles" in podspec, xcode will generate a bundle
185+
# target after pod install. But the bundle have already built when the prebuit
186+
# phase and saved in the framework folder. We will treat it as a normal resource
187+
# file.
188+
# https://github.com/leavez/cocoapods-binary/issues/29
189+
if spec.attributes_hash["resource_bundles"]
190+
bundle_names = spec.attributes_hash["resource_bundles"].keys
191+
spec.attributes_hash["resource_bundles"] = nil
192+
spec.attributes_hash["resources"] ||= []
193+
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
194+
end
195+
183196
# to avoid the warning of missing license
184197
spec.attributes_hash["license"] = {}
185198
end

0 commit comments

Comments
 (0)