ios/flutter 中cocoapods依赖的三方库名字重复
在podfile文件中添加以下代码, 执行pod install时会自动删除重复的文件
pre_install do |installer|
# 定义要删除的文件路径
target_framework_path = 'Pods/xxx/xxx.xcframework'
# 检查并删除重复的 xxx.xcframework
Dir.glob(target_framework_path).each do |framework_path|
if File.exist?(framework_path)
puts "Deleting duplicate framework: #{framework_path}"
FileUtils.rm_rf(framework_path)
end
end
end