iosswiftxcodemacosboringssl

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


After updating to the XCode 16 Beta, when building app i get this error (in attachments), thats basically it. Is there any way to fix that or should I wait for BoringSSL update?

I've tried pod update, changing Minimum Deployment version, it didnt helped.


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