且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从Firestore Swift获取文档ID

更新时间:2023-02-14 09:51:09

我解决了问题.我们只需要添加一个 if 条件,即可从 Firestore

I Solved the problem. We just need to add one if condition to get the documentId of that particular collection from Firestore

for document in snapshot!.documents {

  if document == document {
   print(document.documentID)
     }
       }