ios - 如何在 firestore 数据库中使用 swift 更新数组中的对象( map )?

标签 ios firebase google-cloud-firestore swift4

我想使用 swift 4 将对象的字段更新为 firestore 数据库中的数组。这两个函数 ( arrayUnion() and arrayRemove()) 对我不起作用。

这里是我的数据库架构:

enter image description here

我想更新第一个数组元素中的“状态”字段。

请帮帮我。

最佳答案

首先,我要感谢@Doug Stevenson 的友好回应。 就我而言,我必须将对象数组更改为子集合。

关于ios - 如何在 firestore 数据库中使用 swift 更新数组中的对象( map )?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56118716/

相关文章:

android - 方法始终从 Firestore 数据库查询返回 false

firebase - 在 flutter 中映射 Firebase 流

ios - NSFetchedResultsController 太慢

ios - Swift - 如何遍历 NSDictionary

swift - 如何使用 Firestore 和 Swift 构建 2 人多人游戏的数据?

swift - Firebase 查询排序无法正常工作

ios - 将 [FIRApp configure] 添加到您的应用程序初始化错误中

JavaScriptCore - 在 iOS 中访问 DOMParser

ios - 如何将单独函数中生成的随机数同步到另一个@IBAction func

firebase - 尝试使用.createUserWithEmailAndPassword时为类“The getter '定义的' isn' uid 'AuthResult' t