开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜