'Swift pods cannot yet be integrated as static libraries FirebaseCoreInternal-library

I am building an app by Flutter. I got this error message when doing "pod install" or "pod install --repo-update" or "pod update" and the pod install failed and stopped.

The error message:

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod FirebaseCoreInternal-library depends upon GoogleUtilities-library, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

My Podfile:

platform :ios, '11.0'

...

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

...


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source