GitXplorerGitXplorer
s

ssdatakit

public
452 stars
57 forks
5 issues

Commits

List of commits on branch master.
Unverified
d4a7c7199104a554e3d852c3d148a46d75be0e5c

Deprecated date parsing in favor of the ISO8601 library

ssoffes committed 10 years ago
Unverified
a7d74ec6f610a3422fca68088513046d15481e13

Version 0.3.7

ssoffes committed 10 years ago
Unverified
31f0ce803a62154cb1a300689e6ed6a8e9d56515

Post a notification when the persistent store resets

ssoffes committed 10 years ago
Unverified
7bf52e15d00feb2165355d798e9bb4baa02044e0

Version 0.3.6

ssoffes committed 10 years ago
Unverified
56d104503087cb9e5a12def3d96270f6948dc629

Really support non integer IDs

ssoffes committed 10 years ago
Unverified
b5cc4fceffbc6d7360310765260fd183293ccb64

Modernize SSManagedCollectionViewController internals

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.