Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/cocoapods-binary/Integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,19 @@ def empty_source_files(spec)
# platform and not for another platform.'
empty_source_files(spec)

# to remove the resurce bundle target.
# When specify the "resource_bundles" in podspec, xcode will generate a bundle
# target after pod install. But the bundle have already built when the prebuit
# phase and saved in the framework folder. We will treat it as a normal resource
# file.
# https://github.com/leavez/cocoapods-binary/issues/29
if spec.attributes_hash["resource_bundles"]
bundle_names = spec.attributes_hash["resource_bundles"].keys
spec.attributes_hash["resource_bundles"] = nil
spec.attributes_hash["resources"] ||= []
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
end

# to avoid the warning of missing license
spec.attributes_hash["license"] = {}
end
Expand Down
5 changes: 3 additions & 2 deletions lib/cocoapods-binary/Prebuild.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,11 @@ def prebuild_frameworks!
if target.static_framework? and !target.resource_paths.empty?
framework_path = output_path + target.framework_name
standard_sandbox_path = sandbox.standard_sanbox_path
path_objects = target.resource_paths.select{|f| f.start_with? "${PODS_ROOT}"}.map do |path|
path_objects = target.resource_paths.map do |path|
object = Prebuild::Passer::ResourcePath.new
object.real_file_path = framework_path + File.basename(path)
object.target_file_path = path.gsub('${PODS_ROOT}', standard_sandbox_path.to_s)
object.target_file_path = path.gsub('${PODS_ROOT}', standard_sandbox_path.to_s) if path.start_with? '${PODS_ROOT}'
object.target_file_path = path.gsub("${PODS_CONFIGURATION_BUILD_DIR}", standard_sandbox_path.to_s) if path.start_with? "${PODS_CONFIGURATION_BUILD_DIR}"
object
end
Prebuild::Passer.resources_to_copy_for_static_framework[target.name] = path_objects
Expand Down