BoringSSL-GRPC podspec is incompatible with Xcode

投稿者:

BoringSSL-GRPC podspec is incompatible with Xcode
clang: error: unsupported option ‘-G’ for target ‘arm64-apple-ios13-simulator’
clang: error: unsupported option ‘-G’ for target ‘arm64-apple-ios14-simulator’
clang: error: unsupported option ‘-G’ for target ‘arm64-apple-ios15-simulator’

Thank you for reading this post, don't forget to subscribe!

M4 macの場合には次の記述が必要。M1 macでは不要だった。

   # for M4 mac
   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