I'm experiencing a weird issue with - (void)geocodeAddressString:(NSString *)addressString completionHandler:(CLGeocodeCompletionHandler)completionHandler;
.
I have a list of locations need to be looked up. So I did something like
for (Trip *trip in takenTrips) {
[geoCoder geocodeAddressString:trip.location completionHandler:^(NSArray *placemarks, NSError *error) {
//handling result
}];
}
But it seems the completion handler is only being called once. I tried making these lookups sequentially. Then everything works fine.
I searched around for a while, but couldn't find anything similar to this. I'm totally baffled here...
Any suggestion is welcomed!
Applications should be conscious of how they use geocoding. rules of thumb for using this class effectively: Send at most one geocoding request for any one user action. class link
To solve your problem you could the one of the following: