In AFNetworking 2.x version for Xcode 5, I am Continuously Receiving the warning for this Method for this
AFHTTPRequestOperation *operation = [[[self class] allocWithZone:zone] initWithRequest:self.request];
the self.request
is Incompatible pointer types sending 'NSURLRequest *'
to parameter of type 'MKLocalSearchRequest *'
#pragma mark - NSCopying
- (id)copyWithZone:(NSZone *)zone {
AFHTTPRequestOperation *operation = [[[self class] allocWithZone:zone] initWithRequest:self.request];
operation.responseSerializer = [self.responseSerializer copyWithZone:zone];
operation.completionQueue = self.completionQueue;
operation.completionGroup = self.completionGroup;
return operation;
}
is anybody get Solved this issue(warning) ..
The problem is that [self class]
returns a Class
object of a type that is not determined. The compiler is matching the -initWithRequest:
method with that from MapKit. This can be fixed by changing the code to:
AFHTTPRequestOperation *operation = [(AFHTTPRequestOperation *)[[self class] allocWithZone:zone] initWithRequest:self.request];