【问题标题】:Firestore document doesn't exist when apple reviewing my app苹果审查我的应用程序时,Firestore 文档不存在
【发布时间】:2017-12-19 02:27:20
【问题描述】:

Apple 审核我的应用时,Firestore 文档不存在。我不知道为什么。 这是我的 Firestore 数据库:

Firebase 标尺:

service cloud.firestore {
  match /databases/{database}/documents {
    match /{documents=**} {
        allow read;
    }
  }
}

我尝试在模拟器和我的设备上运行(使用 Testflight),一切正常。但是当我提交到appstore时,苹果评论员说我的应用程序在运行时崩溃了。这是 Fabric 的崩溃日志:

Document '<FSTDocumentKey: public/configs>' doesn't exist. Check document.exists to make sure the document exists before calling document.data.

我知道我可以通过检查 .exist 属性来解决这个问题。但我想知道我在这里做错了什么?

【问题讨论】:

    标签: swift firebase google-cloud-firestore


    【解决方案1】:

    现在,我知道这里出了什么问题。 安装应用后,审阅者关闭互联网连接。

    For Android and iOS, offline persistence is enabled by default.

    reviewer第一次打开app,firestore会从离线数据中查询,此时不存在。

    文档:https://firebase.google.com/docs/firestore/manage-data/enable-offline?authuser=0

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-15
      • 2023-03-24
      相关资源
      最近更新 更多