iosxcodecocoapodsboringssl

BoringSSL-GRPC unsupported option '-G' for target 'arm64-apple-ios15.0'


After updating to Xcode 16 Beta, when building an app, I get this error (in attachments). That's basically it. Is there any way to fix that or should I wait for BoringSSL update?

I've tried pod update and changing Minimum Deployment version. It didn't help.


Solution

  • If you are using Cocoapods this is a quick fix:

    Add this to you Podfile ->

    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
    

    After adding the above code > npx pod-install ./ios OR cd ./ios && pod install

    This issue is from GRPC: https://github.com/grpc/grpc/pull/36904