Closed NasrullahKhan closed 1 month ago
func fetchUser(withUid uid: String, completion: @escaping(User) -> Void) { Firestore.firestore().collection("users") .document(uid) .getDocument { snapshot, _ in guard let snapshot = snapshot else { return } var user: User do { user = try snapshot.data(as: User.self) } catch { print ("Error fetchUser: \(error)") return } completion(user) } }
by updating to latest firebase, the issue is solved. Thanks for your work. actually i'm swift uikit from a decade and there is lot of learning from your code about swiftui. Thanks for your amazing work