Skip to content

Instantly share code, notes, and snippets.

@mikekatz
Created September 14, 2012 14:28

Revisions

  1. Michael Katz revised this gist Sep 14, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.m
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    KCSCollection* books = [KCSCollection collectionFromString:@"books" ofClass:[Book class]];
    KCSLinkedAppdataStore* store = [KCSLinkedAppdataStore storeWithCollection:books options:nil];

    [store loadObjectWithId:@"my-book-id" withCompletionBlock:^(NSArray *objectsOrNil, NSError *errorOrNil) {
    [store loadObjectWithId:@"HPBook6" withCompletionBlock:^(NSArray *objectsOrNil, NSError *errorOrNil) {
    Book* harryPotter = [objectsOrNil objectAtIndex:0];
    Author* jRowling = harryPotter.author;
    } withProgressBlock:^(NSArray *objects, double percentComplete) {
  2. Michael Katz created this gist Sep 14, 2012.
    9 changes: 9 additions & 0 deletions gistfile1.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    KCSCollection* books = [KCSCollection collectionFromString:@"books" ofClass:[Book class]];
    KCSLinkedAppdataStore* store = [KCSLinkedAppdataStore storeWithCollection:books options:nil];

    [store loadObjectWithId:@"my-book-id" withCompletionBlock:^(NSArray *objectsOrNil, NSError *errorOrNil) {
    Book* harryPotter = [objectsOrNil objectAtIndex:0];
    Author* jRowling = harryPotter.author;
    } withProgressBlock:^(NSArray *objects, double percentComplete) {
    //show progress
    }];