I also filed a issue here.

Using this code from the readme:

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
[manager GET:@"http://www.google.com" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
    NSLog(@"JSON: %@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    NSLog(@"Error: %@", error);
}];

The following exception is thrown:

2013-09-27 22:16:10.345 Grades[1000:60b] -[AFHTTPRequestOperation setResponseSerializer:]: unrecognized selector sent to instance 0x1666c3f0
2013-09-27 22:16:10.349 Grades[1000:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AFHTTPRequestOperation setResponseSerializer:]: unrecognized selector sent to instance 0x1666c3f0'
*** First throw call stack:
(0x2ee83f53 0x396926af 0x2ee878e7 0x2ee861d3 0x2edd5598 0xe49ed 0xe4c4d 0x100b93 0x3160f3db 0x31723c57 0x3160f3db 0x316759e7 0x31675971 0x315ed48f 0x2ee4f1d5 0x2ee4cb79 0x2ee4cebb 0x2edb7ce7 0x2edb7acb 0x33ab2283 0x31659a41 0xf1075 0x39b9aab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

I have confirmed that all the AFNetworking files were updated to 2.0.

How do I work around this exception?

有帮助吗?

解决方案

The problem was that some of the files had not been properly updated. Try deleting all AFNetworking files from your project directory, clean and build, install new files, and then clean and build again.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top