Taking the pain out of CoreData

So far, if I have to make an App that uses CoreData, I will without question be using mogenerator and MagicalRecord.

Here are some links for mogenerator:

https://github.com/rentzsch/mogenerator

And then for MagicalRecord:

http://yannickloriot.com/2012/03/magicalrecord-how-to-make-programming-with-core-data-pleasant/

http://ablfx.com/blog/article/2

https://github.com/magicalpanda/MagicalRecord

They’re worth reading and checking out. CoreData does not seem like such a pain anymore.

Just remember:
* One NSManagedObjectContext per thread. So, if you are doing asynchronous work, save your context to the store on that other thread, then in your main thread callback, make sure you’ve passed an array of objectId’s (NSNumbers) so you can fetch those objects on the main thread.

I’m assuming you’re using CoreData for fairly simple purposes in mobile apps. Not really talking about editing apps with undo managers, etc. Just basic persistence and fetching and so on.

Advertisements

One thought on “Taking the pain out of CoreData

  1. I used magical record for our (highly concurrent) Spacedeck app – works like a charm! If you work on multi threaded core data apps, MR is the lib you want to use.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s