ios - 控制台中的 Firebase JSON 位置

标签 ios json firebase firebase-realtime-database

我正在使用 JSON 和 Firebase 控制台创建一个 iOS 应用程序。我已经在控制台中为 Firebase 设置了所有内容,但也引用了这篇 Ray Wenderlich 文档以寻求帮助(它非常有用)。

https://www.raywenderlich.com/3-firebase-tutorial-getting-started

我的问题是关于结构化数据部分的。特别是,他们为数据模型引用的 JSON 是:

// The root of the tree
{
  // grocery-items
  "grocery-items": {

    // grocery-items/milk
    "milk": {

      // grocery-items/milk/name
      "name": "Milk",

      // grocery-items/milk/addedByUser
      "addedByUser": "David"
    },

    "pizza": {
      "name": "Pizza",
      "addedByUser": "Alice"
    },
  }
}

我的问题是 - 这个文件存储或创建在哪里,或者它通常被称为什么?我需要为我的应用程序设置此 JSON 的不同版本(即它不涉及杂货项目,但确实涉及用户上传照片)。

我无法在项目文件中找到 JSON,因此在我自己的项目中尝试遵循此示例,但无法确定此 JSON 文件或数据的存储位置。它在 Xcode 中的什么位置,还是在控制台中的某个地方?

最佳答案

处理实时数据库时不需要使用 JSON 文件。您可以使用提供的 SDK 直接读取和写入数据。提供 JSON 文件导入是为了方便引导数据库的初始内容,或恢复从控制台保存的备份。

关于ios - 控制台中的 Firebase JSON 位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56550338/

相关文章:

json - 如何通过 Dart 使用方法和数据发布到外部 API

java - list 合并失败 : Attribute application@appComponentFactory updating Firebase libraries

firebase - 如何在 Firebase RemoteConfig 上设置多个 "not contains"条件?

iphone - 通过 cell.contentView 添加 UIView 到 UITableViewCell

iphone - 使用 TWRequest 的推特更新给出 403 错误

javascript - 通过 jQuery 写入 JSON 数据

javascript - 将 JSON 数组转换为 JSON 对象序列

ios - Firebase 错误 : You must enable this service in the console

ios - Swift UICollectionView Cells 移动/UIButton 标签在 ReloadData 上闪烁

ios - 在显示 tableview 之前尝试完成 Firebase 存储下载的问题