The documentation for FirebaseUI-Firestore iOS is not very thorough, I've implemented the code but my collection view does not get populated:
class HomeViewController:UIViewController {
@IBOutlet weak var collectionView: UICollectionView!
var firestore:Firestore = Firestore.firestore()
override func viewDidLoad() {
super.viewDidLoad()
let query = firestore.collection("/offers")
let dataSource = collectionView.bind(toFirestoreQuery: query) { (collectionView, indexPath, documentSnapshot) -> UICollectionViewCell in
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! OfferHolderCollection
print("POPULATING")
cell.myLabel?.text = documentSnapshot.data()?["name"] as? String
return cell
}
}
On Android, the adapter.startListening() method would be placed inside onResume() in order to start retrieving data, but there seems to be no such method for iOS. Should the code above be enough to start retrieving data?