Giter Club home page Giter Club logo

rkgist's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rkgist's Issues

Error Core Data "NSUnderlyingException" after resetPersistentStores.

Hello Blake.
When I do next stuff:

[[RKObjectManager sharedManager].operationQueue cancelAllOperations];
  [[NSURLCache sharedURLCache] removeAllCachedResponses];
  [RKObjectManager sharedManager].managedObjectStore.managedObjectCache = nil;
  NSError * error = nil;
  [[RKObjectManager sharedManager].managedObjectStore resetPersistentStores:&error];
  if(error){
    NSLog(@"error reset persistent store: %@", error.localizedDescription);
  }

The NSLog(@"error reset persistent store: %@", error.localizedDescription); is clear. So reset did success.
I not relaunch app, just show Login page for user and after login, in first mapping to entity, this errors appears:

restkit.core_data.cache:RKEntityByAttributeCache.m:227 Failed to retrieve managed object with ID 0x8b768c0 . Error The operation couldn’t be completed. (Cocoa error 133000.)
{
    NSUnderlyingException = "Object's persistent store is not reachable from this NSManagedObjectContext's coordinator";
}
E restkit.core_data.cache:RKEntityByAttributeCache.m:227 Failed to retrieve managed object with ID 0x8bce8e0 . Error The operation couldn’t be completed. (Cocoa error 133000.)
{
    NSUnderlyingException = "Object's persistent store is not reachable from this NSManagedObjectContext's coordinator";
}
E restkit.core_data.cache:RKEntityByAttributeCache.m:227 Failed to retrieve managed object with ID 0x8bcea30 . Error The operation couldn’t be completed. (Cocoa error 133000.)
{
    NSUnderlyingException = "Object's persistent store is not reachable from this NSManagedObjectContext's coordinator";
}

What I do wrong?
Thank you.

Pull requests ignored

Thought of contributing to completion of the tutorial, but it looks as if pull requests are ignored. Seven months and nine months. Simple contributions. No action.

Thank you for the tutorial. It is so far very encouraging.

Crash when tapping row

2015-03-23 08:33:56.350 RKGist[45281:1988533] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<RKGGist 0x7c055040> valueForUndefinedKey:]: the entity Gist is not key value coding-compliant for the key "timeStamp".'
*** First throw call stack:
(
    0   CoreFoundation                      0x0283d466 __exceptionPreprocess + 182
    1   libobjc.A.dylib                     0x024c6a97 objc_exception_throw + 44
    2   CoreFoundation                      0x0283d081 -[NSException raise] + 17
    3   CoreData                            0x0072598a -[NSManagedObject valueForUndefinedKey:] + 362
    4   Foundation                          0x01e77f28 _NSGetUsingKeyValueGetter + 104
    5   CoreData                            0x006bced3 -[NSManagedObject valueForKey:] + 131
    6   RKGist                              0x000757a7 -[RKGDetailViewController configureView] + 183
    7   RKGist                              0x000756c3 -[RKGDetailViewController setDetailItem:] + 131
    8   ...

add guidelines when to use mainQueueManagedObjectContext vs persistentStoreManagedObjectContext vs newChildManagedObjectContextWithConcurrencyType

@blakewatters if you could add examples / guidelines (or in RKGist tutorial) some general rules on when to use mainQueueManagedObjectContext vs persistentStoreManagedObjectContext vs newChildManagedObjectContextWithConcurrencyType.

We have an use case where a background is loading a huge list (in chunks of 100 objects at a time), but the UI wants to render that list and also makes references to some other objects already in CoreData... when all that happens, I see deadlocks and I'm still not sure exactly what's going on.

Spelling / Wording Issues

In Getting Acquainted with RestKit I spotted to issues:

  1. In Guide Assumptions under Objective-C Runtime:
    "Objective-C provides dynamic functionality such as runtime type inspection, declared property introspection, and and message forwarding."
  2. In Updating the Table UI:
    "We've covered a lot of ground and put together a fair amount of functionality with a relatively small amount of code, but the application isn't all that existing to look at."

Should it be exciting?

How to tackle "user": null

Tried to enhance the sample project starting with the user information by doing

    // User Entity
    RKEntityMapping *userEntityMapping = [RKEntityMapping mappingForEntityForName:@"User" inManagedObjectStore:managedObjectStore];
    userEntityMapping.identificationAttributes = @[@"userID"];
    [userEntityMapping addAttributeMappingsFromDictionary:@{
        @"id"          : @"userID",
        @"avatar_url"  : @"avatarURL",
        @"gravatar_id" : @"gravatarID",
        @"url"         : @"jsonURL",
        @"login"       : @"login"}];

    RKResponseDescriptor *userResponseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:userEntityMapping pathPattern:@"/gists/public" keyPath:@"user" statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];

    [objectManager addResponseDescriptor:userResponseDescriptor];

but as the json contains some users with null values I got an exception in

static NSDictionary *RKEntityIdentificationAttributesForEntityMappingWithRepresentation(RKEntityMapping *entityMapping, NSDictionary *representation)

I can see that in

- (NSArray *)mapRepresentations:(id)representations atKeyPath:(NSString *)keyPath usingMapping:(RKMapping *)mapping

the objectsToMap array some [NSNull null] value are inserted.
Couldn't find any protocol/delegate calls to avoid having null values added to this array.

Any help is appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.