lib/cocoapods-binaryhqp/Prebuild.rb in cocoapods-binaryhqp-0.5.1 vs lib/cocoapods-binaryhqp/Prebuild.rb in cocoapods-binaryhqp-0.5.2

- old
+ new

@@ -255,13 +255,20 @@ # https://github.com/leavez/cocoapods-binary/issues/50 target.resource_paths.values.flatten end end raise "Wrong type: #{resources}" unless resources.kind_of? Array - + # resource : ${PODS_ROOT} + # resource_bundles : ${PODS_CONFIGURATION_BUILD_DIR},不做处理 path_objects = resources.map do |path| + prebuild_real_path = (path.gsub('${PODS_ROOT}', sandbox.root.to_s) if path.start_with? '${PODS_ROOT}')|| "" + real_file_path = framework_path + File.basename(path) + if Pathname.new(prebuild_real_path).exist? + # 静态库的resource,拷贝至framework目录下 + FileUtils.cp_r(prebuild_real_path, real_file_path, :remove_destination => true) + end object = Prebuild::Passer::ResourcePath.new - object.real_file_path = framework_path + File.basename(path) + object.real_file_path = real_file_path 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 \ No newline at end of file