ResKit iOS - Application crash when i receive HTTP Error Code in RKObjectManager postObject method
i'm using RKObjectM开发者_运维技巧anager to make iOS RESTful requests to map responses to local objects. When i receive HTTP error codes like 400, RestKit sends data to RKObjectLoaderDelegate method:
- (void)objectLoaderDidLoadUnexpectedResponse:(RKObjectLoader *)objectLoader
but immediately afterwards the application crash without any reason. The debugger doesn't give me any more information, where and why the application crashes.
To make the request
RKObjectManager * objectManager = [RKObjectManager objectManagerWithBaseURL:SERVER_BASE_URL];
RKDynamicRouter* router = [[RKDynamicRouter new] autorelease];
objectManager.router = router;
objectManager.format = RKMappingFormatJSON;
[router routeClass:[RKTUser class] toResourcePath:@"sessions" forMethod:RKRequestMethodPOST];
[[RKObjectManager sharedManager] postObject:user delegate:self];
Anyone with the same problem?
I just updated RestKit framework, and it start to work.
精彩评论