ios - <FirebaseDatabase/FirebaseDatabase.h> 未找到(词法或预处理器问题)

标签 ios swift swift3 cocoapods

enter image description here enter image description here friend 们,我安装名为 用于选择国家/地区的 SwiftCountrySelector,但在安装 pod 后我收到名为 FirebaseDatabase/FirebaseDatabase.h 的错误未找到。帮助我的 friend

我的pod文件在上面

最佳答案

我在使用 Geofire 2.0 cocoapod 时也遇到了同样的问题,但我能够通过关闭 xcode 并运行 pod update 来获取我的 firebaseDatabase pod 升级到 4.0 版以及 pod install 以确保项目中包含最新的 Firebase 数据库和 Geofire pod。您的播客文件应如下所示:

pod 'Firebase'
pod 'Firebase/Database'
pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'

然后您需要打开 xcode 项目,并导航到:

Pods/ FirebaseDatabase/ Frameworks/ FirebaseDatabase.framework

单击 FirebaseDatabase.framework,然后选中右侧的 GeoFire 目标成员复选框。清理应用程序并重新运行,它应该可以工作。

enter image description here

查看此 github 帖子以获取更多信息。我实际上是直接从 Firebase 文档中找到这篇文章的:

Geofire Cocoapod 2.0 Isn't Available

关于ios - <FirebaseDatabase/FirebaseDatabase.h> 未找到(词法或预处理器问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45251967/

相关文章:

iphone - 加载 xib 文件

ios - YouTubePlayerView全屏将视频捕捉到顶部

ios - UITableView:IndexPath.row 超出范围( fatal error )

swift - 嵌套的 UITableView 动态高度

ios - uitableview单元格动态高度

ios - 在 GooeySlideMenu 上添加时不调用 UITableView 委托(delegate)方法

url - 为 URL 请求设置 Cookie

ios - 如何将 iPhone 应用程序中的 Web View 映射到 Apple Watch 应用程序

swift - 在 Swift 的 block 内运行方法

swift - 不能对 'String' 类型的不可变值使用可变成员