I copied and pasted the documentation from Firestore:
private func getMultipleAll() async {
// [START get_multiple_all]
do {
let querySnapshot = try await self.db.collection("cities").getDocuments()
for document in querySnapshot.documents {
print("(document.documentID) => (document.data())")
}
} catch {
print("Error getting documents: (error)")
}
// [END get_multiple_all]
}
Here’s the link: https://firebase.google.com/docs/firestore/query-data/get-data?hl=en&authuser=0
Every time I try to run this it crashes and goes to the App Delegate. It’s copied and pasted from google. Any help?