Question

I've got an annoying problem with the Magical Record library for iOS. I create the Core Data stack with [MagicalRecord setupAutoMigratingCoreDataStack], I create a new object of an entity with [EntityName MR_createEntity] and afterwards I call [[NSManagedObjectContext MR_defaultContext] MR_saveOnlySelfAndWait] to persist the changes.

When I call [EntityName MR_findAll] directly afterwards the entry exists. But when I terminate the app, start it right again, there is no entry. The .sqlite file's edit date stays the same all the time, so I assume that nothing gets written to that file.

I changed the journal mode to "DELETE", because I read of problems like this, no difference.

Could you please help me and give me a hint what could be the issue? I'm going crazy here...I work with Core Data for almost 2 years now, thought I should try Magical Record, but it doesn't persist the data...

Was it helpful?

Solution

Use

MR_saveToPersistentStoreAndWait

instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top