I have followed the UIKit section of this Apple iOS Dev Tutorial, up to and including the Saving New Reminders section. The tutorials provide full code for download at the beginning of each section.
But, I want to get Firebase involved. I have some other Firestore projects that work, but I always thought that I was doing something not quite right, so I'm always looking for better examples to learn from.
This is how I found Peter Friese's 3-part YT series, "Build a To-Do list with Swift UI and Firebase". (https://bit.ly/2UaLUC3) While I'm not using SwiftUI, I figured that the Firestore code should probably work with just a few changes, as he creates a Repository whose sole function is to interface between app and Firestore. No UI involved.
So, following his example, I added a ReminderRepository.
It doesn't work, but I'm so close.
The UITableView looks empty but I know that the records are being loaded.
Stepping through in the debugger, I see that the first time the numberOfRowsInSection is called, the data hasn't been loaded from the Firestore, so it returns 0. But, eventually the code does load the data. I can see each Reminder as it's being mapped and at the end, all documents are loaded into the reminderRepository.reminders property.
But I can't figure out how to get the loadData() to make the table reload later.
As a temporary solution, I've aded a UIRefreshControl. When I launch and get the blank table, I pull to refresh, and voilà, there's my data. But, I'm trying to get the list to display immediately and also refresh when I add new Reminders. Modifying existing reminders updates the table correctly.
Help?
Same question on StackOverflow
Post
Replies
Boosts
Views
Activity
Hi,
I have an app on the App Store which targets iOS 11.
I would like to use SwiftUI for a new version of my app, so I need to change my minimum iOS to iOS 13, but I don't want to alienate pre-iOS 13 users.
Will the App Store provide access (update or first install) to the earlier version for users who are not yet on iOS 13? Or will they forced to upgrade or blocked from using the app?
If it's possible to support both pre-iOS 13 and iOS 13 users, what do I need to do or is it automatic?