Best approach for handling Firestore reads in a Swift iOS app?
Hi everyone, I recently started getting into iOS app development using Swift.
I’m currently learning, researching, and building an app where users can create shared sports activity sessions with other users.
In my app, users will be able to view the history of their sessions, which over time could easily grow to 100–200 sessions per user.
For the entire backend infrastructure I’m using Firebase, and so far everything has been great. However, at some point I realized that Firebase counts a lot of reads depending on the number of returned documents.
For example: if a user has 200 sessions, that counts as 200 reads.
This worries me because as the number of users grows, the amount of reads could explode.
Another thing that worries me is that every time the app launches and a user wants to see their sessions, new reads are triggered again.
So I’d like to ask you: what’s the best approach in this case?
Should I fetch everything from Firebase the first time and then store the data locally? Maybe using GRDB.swift?
Thank you!