lib/cocoapods-xcframework/xbuilder.rb in cocoapods-bb-xcframework-0.2.6.3 vs lib/cocoapods-xcframework/xbuilder.rb in cocoapods-bb-xcframework-0.2.6.4
- old
+ new
@@ -181,11 +181,13 @@
end
outputs_xcframework target_dir
outputs_bundle target_dir
new_spec_hash = generic_new_podspec_hash @spec
new_spec_hash[:vendored_frameworks] = "#{@spec.name}.xcframework"
- new_spec_hash = fix_header_file new_spec_hash, "#{target_dir}/#{@spec.name}.xcframework"
+ xcframework_path = "#{target_dir}/#{@spec.name}.xcframework"
+ new_spec_hash = fix_header_file new_spec_hash, xcframework_path
+ new_spec_hash = fix_bundle_file(@spec, new_spec_hash, @source_dir, xcframework_path)
find_bundles(target_dir).each do |plat, value|
if new_spec_hash[plat]
new_spec_hash[plat]["resource_bundles"] = value
else
new_spec_hash[plat] = {
@@ -200,10 +202,10 @@
end
# fix xcframework-is-not-a-member-type-of-error https://v3.bbcloud.babybus.com/team/184/wiki/13820
UI.puts "fix xcframework-is-not-a-member-type-of-error:#{target_dir}"
fix_xcframework_error(target_dir, @spec.name)
- UI.puts "result export at :#{target_dir}"
+ UI.puts "result export at :#{target_dir} 生成成功".green
target_dir
end
def fix_xcframework_error target_dir, name
command = "find #{target_dir} -name '*.swiftinterface' -exec sed -i -e 's/#{name}\\.//g' {} \\; && find #{target_dir} -name '*.swiftinterface-e' | xargs rm -rf"