On a personal project I’m trying to retrieve data from my firebase database and am getting a problem where the code just jumps straight over the getDocument part and doesn’t go into the closure (code copied below). I don’t really understand why this would be happening. Hope you can help!
let db = Firestore.firestore()
db.collection(“questions”).document(“doc”).getDocument { (snapshot, error) in
if error != nil || snapshot == nil {
return
}
}