[!] The following Swift pods can

2024-07-08  本文已影响0人  冰天无幻

这个只能解决pod install 下载成功,无法解决运行报错

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

The Swift pod `Fxxxxx` depends upon `Gxxxxx`, 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.

The Swift pod `FirebaseDatabase` depends upon `lxxx-library`, `Fxxxx`, and `Fxxx`, which do 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.

在Podfile 加上:

use_frameworks!

  use_modular_headers!

target 'xx' do

  # 下面两行代码是为了解决 Firebase 报错

  use_frameworks!

  use_modular_headers!

  config = use_native_modules!

  use_react_native!(

    :path => config[:reactNativePath],

    # An absolute path to your application root.

    :app_path => "#{Pod::Config.instance.installation_root}/.."

  )

  target 'xxTests' do

    inherit! :complete

    # Pods for testing

  end

上面的错误其实说的很清楚了,

 you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

来源:https://stackoverflow.com/questions/72289521/swift-pods-cannot-yet-be-integrated-as-static-libraries-firebasecoreinternal-lib

有错误的地方请指出。

上一篇 下一篇

猜你喜欢

热点阅读