【发布时间】:2021-12-05 01:09:24
【问题描述】:
这不是问题,而是错误的解决方案:
*** Terminating app due to uncaught exception 'FIRInvalidArgumentException', reason: 'Document path cannot be empty.'
terminating with uncaught exception of type NSException
有些人会遇到类似的问题,因为在旧版本的 Firebase 中,文档的检查语句只会检查 nil 字符串而不是空字符串。最新版本的 Firebase 检查 nil 和空字符串。
【问题讨论】:
-
一般而言,Stack Overflow 的格式并不完全正确,但如果您认为这对人们广泛有用,更好的格式化方法是将其作为问题,然后发布您自己的答案。有时间延迟,但您可以将自己的答案标记为已接受。
-
@brandonscript 你完全正确,我将编辑帖子并包含答案,我只需要记住在 2 天内将其标记为正确。
标签: ios swift firebase google-cloud-firestore