使用 CocoaPods 找不到 Firebase.h 文件

Nir*_*inh 7 xcode ios cocoapods firebase react-native

我正在尝试将 Firebase 添加到我的项目中。我刚刚将下面的 pod 添加到我的 Xcode 项目中。

  pod 'Firebase'
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
  pod 'Firebase/Database'
  pod 'Firebase/Auth'
Run Code Online (Sandbox Code Playgroud)

安装 podfile 后,我尝试将 firebase 导入到我的项目中。但它给了我一个错误,即找不到 Firebase.h。

呐

当我取消选中Run script only when installingfrom时会出现上述问题[CP] Check pods Manifest.lock。之后我将使用pod install. 然后就会出现问题。

取消选中复选框后出现的错误:

error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Run Code Online (Sandbox Code Playgroud)

err*_*rau 3

我的项目也遇到了同样的问题

我手动编写链接项目及其库来解决问题,我按照此链接步骤进行操作 https://github.com/invertase/react-native-firebase-docs/blob/master/docs/installation/ios.md

另外,您必须检查二进制文件与 Xcode 项目上的库的链接。

另一种解决方案是,您可以删除所有依赖于库的 pod,然后pod init 在之后添加手动 pod 库pod install