GitXplorerGitXplorer
s

ssdatakit

public
452 stars
57 forks
5 issues

Commits

List of commits on branch master.
Unverified
dbb811f94a3be9cfacb988d39101c719cdd3b1af

Merge pull request #38 from bountylabs/master

ssoffes committed 10 years ago
Unverified
301a86b9fe6408d5c84462b92ecfbd925cfdd8aa

fix main queue context race condition

aaaronwasserman committed 10 years ago
Unverified
9a97a433d176d7d76a13d01eca6a0ab460a8d52d

Version 0.3.9

ssoffes committed 10 years ago
Unverified
080c5cd8546c52c16813d89d548b74e51d5ca4a3

Silence warnings and remove date tests

ssoffes committed 10 years ago
Unverified
aa06bd3477a027ebb023c3480271bb8b01fe13d7

Remove that

ssoffes committed 10 years ago
Unverified
4d100084b5380010164e6707a962532ba770b4aa

Add all of the source files to the OS X target

ssoffes committed 10 years ago

README

The README file for this repository.

SSDataKit

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

SSManagedObject

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

SSRemoteManagedObject

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

Example

This is very simple example of how to use SSRemoteManagedObject.

Post.m

- (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.