Hi Dave - Thank you. I believe you are correct. The problem is/was something to do with data model versions. I've worked around this by going the other direction to add frameworks to a project - I started a new project using a demo for the other library and added STV+CoreData to it. That's working
I believe this has to do with Core Data on the simulator not actually saving to the underlying datastore (SQLite database) until the app is exited by pressing the home button.
That's correct, as noted in the eBook on page 27.
Next up is to try adding a save:nil
save:&error and do something if there is an error!
on the managedObjectContext as defined by STV in the code that triggers the other frameworks. I believe that will force all add/edit/delete actions to complete in the database so the content will be there when MagicalRecord tries to access it.
Correct. But don't think of Core Data as a database, it's not. Core Data is "an object graph and persistence framework". If you go anywhere near the SQLite you are doing it wrong IMHO.
This Mac application, CoreDataPro, helps a LOT when looking at the Core Data store in the simulator while you are running your app in the simulator:https://github.com/y...CoreDataUtility
Is there a property on SCTableViewController that can be set to cause "Done" to commit the save in the database immediately (i.e. without pressing the home button)?
I use the following to call a method to save Core Data:
If the method you call to do the save (and check for errors and handle any errors) also first asks Core Data if it hasChanges, and only do the save:&error if there are changes, then there isn't much overhead.
Also - is this behavior different when run on a device instead of in the simulator?
It's the same on a device and in the simulator.
Edited by Dave Guerin, 14 February 2014 - 02:59 AM.