I've created a SQLite database that contains records from some JSON using this tutorial, and I want to use MagicalRecord to query it.
MagicalRecord sees the NSManagedObject (BlogPost
) and can create records, but it doesn't see the prepopulated records, so I'm guessing it's not seeing the SQLite file I've added. I've verified that the SQLite database does indeed contain rows using a SQLite client.
In application:didFinishLaunchingWithOptions:
, I've put:
[MagicalRecord setupCoreDataStackWithStoreNamed:@"DBG.sqlite"];
And in applicationWillTerminate:
:
[MagicalRecord cleanUp];
When I call [BlogPost MR_findAll]
in a controller, it returns an empty set. DBG.sqlite is at the root of the project directory, and I've tried putting it in "Copy Bundle Resources", but blogPosts
still returns an empty set.
Any ideas?