Post

Replies

Boosts

Views

Activity

Reply to Save When Program Exits
If this is really when you want to save(), I suggest reading up on the lifecycle of an app and using appropriate scene delegate methods if that’s the flow your app used. Of course, iOS doesn’t ever really tell you if your app has been force-terminated by the user.
Apr ’21
Reply to Have you ever encountered NSFetchedResultsController not able to properly "section" based on sectionNameKeyPath, randomly?
The documentation states: Changes are not reflected until after the controller’s managed object context has received a processPendingChanges() message. Therefore, if you change the value of a managed object’s attribute so that its location in a fetched results controller’s results set would change, its index as reported by the controller would typically not change until the end of the current event cycle (when processPendingChanges() is invoked). Maybe what’s happening is just that. And on the view context pending changes are just processed sooner. You could hook into that method to check. https://developer.apple.com/documentation/coredata/nsfetchedresultscontroller
Apr ’21