File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,19 @@ def remove_target_files_if_needed
180
180
spec . attributes_hash [ "resources" ] += bundle_names . map { |n | n +".bundle" }
181
181
end
182
182
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
+
183
196
# to avoid the warning of missing license
184
197
spec . attributes_hash [ "license" ] = { }
185
198
end
You can’t perform that action at this time.
0 commit comments