I have tried the following:
let data = FirebaseManager.shared.firestore.collection("favourites").where("uid", "==", user?.uid).get()
print(data)
and I get: Value of type 'CollectionReference' has no member 'where'
Please help?
I have tried the following:
let data = FirebaseManager.shared.firestore.collection("favourites").where("uid", "==", user?.uid).get()
print(data)
and I get: Value of type 'CollectionReference' has no member 'where'
Please help?
My new View has lots of errors in
import SwiftUI
import Firebase
struct FavouritesListView: View {
func getUsersFavourites() {
var user = FirebaseManager.shared.auth.currentUser
let data = FirebaseManager.shared.firestore.collection("favourites").where("uid", "==", user?.uid).get()
print(data)
}
var body: some View {
self.getUsersFavourites()
}
}
struct FavouritesListView_Previews: PreviewProvider {
static var previews: some View {
FavouritesListView()
}
}
Type '()' cannot conform to 'View'
is anyone able to help me out here please?