Reputation: 29084
I am a newbie to AFNetworking and running a simple application to understand how AFNetworking is working. I am following this tutorial on MobileTuts:
I am already included the AFNetworking library and also typed -fno-objc-arc into the Compile Sources for each AFNetworking file.
I included this portion into the implementation file:
NSURL *url = [[NSURL alloc] initWithString:@"http://itunes.apple.com/search?term=harry&country=us&entity=movie"];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
NSLog(@"JSON");
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
NSLog(@"Request Failed with Error: %@, %@", error, error.userInfo);
}];
[operation start];
When I hit run, I have 14 semantic issues and the project failed. For example one error is:
Method possibly missing a [super dealloc] call.
Not sure how to solve this error. Need some guidance...
Upvotes: 0
Views: 398
Reputation: 38249
Try this:
Firstly delete
AFNetworking
library
and clean project.
Now download
latest AFNetworking.
Add
again AFNetworking
library
and build
the project.
Upvotes: 2