我正在尝试动态地将“参与者”的子集合实现为事件ID,但是在实现它方面很费力,据我所知,我只是在努力弄清楚如何检查了文档只显示硬编码版本,但是手动创建“参与者”收藏集并不理想
// -MARK: Sign Up Btn
@IBAction func signUpBtnTap(_ sender: Any) {
// create firebase atendee add atendee to the ride attendee,
let db = Firestore.firestore()
let user = (Auth.auth().currentUser?.displayName)!
let attend = "Attendees"
//db.collection("Events").document(docID).collection("Attendees").addocument("userID")
db.collection("Events").document(docID).collection(attend).addDocument(data: user)
}
}