Eliminate your Core Data boilerplate code
Objective-C Ruby
Latest commit dbb811f May 6, 2015 @soffes Merge pull request #38 from bountylabs/master
fix main queue context race condition



There is a lot of boilerplate code required to write a Core Data application. This is annoying. In pretty much everything I've written since Core Data came to iOS, I have used the following class.

What's Included


  • Manages main context, persistent store, etc
  • Accessing entity descriptions
  • Reflection
  • Easy creating and deleting


  • Easily find or create objects by a remote ID
  • Unpack NSDictionary's into your Core Data object's attributes


This is very simple example of how to use SSRemoteManagedObject.


- (void)unpackDictionary:(NSDictionary *)dictionary {
  [super unpackDictionary:dictionary];
  self.title = dictionary[@"title"];

Now you can create and find posts easily.

Post *post = [Post objectWithDictionary:@{@"id": @(1), @"title": @"Hello World"}];
Post *anotherPost = [Post objectWithRemoteID:@(1)];
NSLog(@"Equal: %i", [post isEqual:anotherPost]); // Equal: 1

For a more complete example, see CheddarKit which is used in Cheddar for iOS and Cheddar for Mac.