I was developing an app using CLGeocoder, and suddenly it stopped working without me making any changes to the code, and started to return the following error.
ERROR /SourceCache/ProtocolBuffer/ProtocolBuffer-187.4/Runtime/PBRequester.m:825 server ( link ) returned error: 500 /SourceCache/ProtocolBuffer/ProtocolBuffer-187.4/Runtime/PBRequester.m:825 server ( link < User last replied: 1 hour ago User last replied: 1 month, 3 days ago User last replied:
My code
- (void)handleSearch:(UISearchBar *)searchBar {
NSLog(@"User searched for %@", srBar.text);
[searchBar resignFirstResponder];
NSString *location = srBar.text;
CLGeocoder *geocoder = [[CLGeocoder alloc] init];
[geocoder geocodeAddressString:location
completionHandler:^(NSArray* placemarks, NSError* error){
if (placemarks && placemarks.count > 0) {
CLPlacemark *topResult = [placemarks objectAtIndex:0];
MKPlacemark *placemark = [[MKPlacemark alloc] initWithPlacemark:topResult];
MKCoordinateRegion region = self.mapaView.region;
region.center = placemark.region.center;
region.span.longitudeDelta /= 8.0;
region.span.latitudeDelta /= 8.0;
[self.mapaView setRegion:region animated:YES];
[self.mapaView addAnnotation:placemark];
}
}
];
}
Asked also in SOen .