无法识别的选择器发送到实例AFNetworking

时间:2014-06-29 08:25:10

标签: ios objective-c afnetworking

我的应用程序在此处崩溃

-(void)parseUserJobsJSONData:(NSData *)data
{
    NSArray *jobsData = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];    
}

我正在尝试将响应对象传递给此方法

success:^(AFHTTPRequestOperation *operation, id responseObject) { 
                                 if (operation.response.statusCode == 200) {
                                     [self parseUserJobsJSONData:responseObject];
                                 }

错误是

[__NSCFDictionary bytes]: unrecognized selector sent to instance 0x10952ddb0
2014-06-29 09:21:10.173 myapp[9759:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary bytes]: unrecognized selector sent to instance 0x10952ddb0'

我认为问题是responseObject类型的格式不正确,但我不确定它需要什么。

我已经尝试过这个问题的答案,How do I make my AFNetworking "responseObject" that I receive a NSDictionary I can parse?,但这不起作用。

0 个答案:

没有答案