升级Xcode16.0后pod库报错

2024-10-15  本文已影响0人  printHello

升级Xcode16.0后pod库报错
/Users/xxxx/Desktop/代码/项目名/项目名/Pods/BoringSSL-GRPC/src/ssl/tls13_enc.cc unsupported option '-G' for target 'arm64-apple-ios10.0'

解决办法:
在Podfile的项目target中添加下面内容,重新pod update

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'BoringSSL-GRPC'
      target.source_build_phase.files.each do |file|
        if file.settings && file.settings['COMPILER_FLAGS']
          flags = file.settings['COMPILER_FLAGS'].split
          flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
          file.settings['COMPILER_FLAGS'] = flags.join(' ')
        end
      end
    end
  end
end

参考https://github.com/grpc/grpc/issues/36888

上一篇 下一篇

猜你喜欢

热点阅读