【问题标题】:Firebase Firestore "Could not build module 'nanopb'Firebase Firestore“无法构建模块‘nanopb’
【发布时间】:2017-10-31 01:51:49
【问题描述】:

我正在尝试新的 firebase firestore 数据库。我的 pod 文件有这两个依赖项。如果我不包含 firestore,我的项目将会构建。

pod 'Firebase/Core'
pod 'Firebase/Firestore'

我在几个地方收到错误“无法构建模块 'nanopb'”和“未知类型名称 'FOUNDATION_EXPORT'”。我想知道这是否是 Firestore 的一个已知问题。我想我可以降低 Firestore 上的版本,但我不确定该怎么做。

我的 pod 版本是: 火力基地 4.5.0 FirebaseFirestore (0.9.1)

更新:我建立了一个新项目并遇到了同样的错误。在这一点上,我只能想象这个版本的 firestore 有错误,或者我没有包含我需要的东西。现在有推荐的版本吗?

【问题讨论】:

    标签: swift firebase firebase-realtime-database google-cloud-firestore


    【解决方案1】:

    确保您使用的 CocoaPods 版本高于 1.2.1。我在 Firebase 代码实验室中尝试此操作并得到与您相同的结果,直到我更新为匹配 the displayed CocoaPods requirement

    我以为我安装了更新版本的 CP,但当我运行 pod --version 时,结果发现我运行的是 1.1.1。糟糕!

    【讨论】:

    • Firestore 的 gRPC 依赖依赖于部署在 CocoaPods 1.2.0 中的 github.com/CocoaPods/CocoaPods/issues/6024 的 CocoaPods 修复。
    • 这是对的!我从 GitHub 上的 firebase 团队得到了同样的答案。感谢您的帮助。
    猜你喜欢
    • 1970-01-01
    • 2021-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-25
    • 2017-06-02
    • 2018-07-21
    相关资源
    最近更新 更多