4

I am trying to resolve the address (trying to convert latitude & longitude to readable address) using [[GMSGeocoder geocoder] reverseGeocodeCoordinate:{}];. I am not getting any response data and following error

ClientParametersRequest failed, 3 attempts remaining (0 vs 6). Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" UserInfo=0x17e080b0 {data={length = 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}

Shrinivas Kulkarni
  • 492
  • 2
  • 5
  • 17
  • Are you using a valid Google Maps iOS API key? – not_a_bot Jun 30 '15 at 17:41
  • Also, make sure you enable the GoogleMap SDK for iOS in the Google APIs Console as seen in [this](http://stackoverflow.com/a/15028369/4241842) answer. – not_a_bot Jun 30 '15 at 17:47
  • i have a valid API key. And also enabled the GoogleMap SDK for iOS. – Shrinivas Kulkarni Jul 01 '15 at 05:22
  • @not_a_bot is there any thing else I have to look into, where I may be wrong? – Shrinivas Kulkarni Jul 01 '15 at 06:39
  • It's hard to say without seeing some code. Is there an example that you're following? Which other APIs have you enabled in the APIs console? Are you seeing this on a simulator or an actual device? Also, which version of the iOS SDK are you using? – not_a_bot Jul 01 '15 at 18:02
  • I am using iOS 8.3 as my base SDK. in ***AppDelegate.m*** I have used this line of code ***[GMSServices provideAPIKey:GOOGLE_API_KEY];*** I am referring following link https://developers.google.com/places/ios/ – Shrinivas Kulkarni Jul 02 '15 at 05:25
  • Following is the code for getting address from coordinate. ***[[GMSGeocoder geocoder] reverseGeocodeCoordinate:CLLocationCoordinate2DMake(40.4375, -3.6818) completionHandler:^(GMSReverseGeocodeResponse* response, NSError* error) { NSLog(@"reverse geocoding results:");*** – Shrinivas Kulkarni Jul 02 '15 at 05:51
  • I have same issue here :( I will try to figure it out – Greensource Jan 05 '16 at 09:50

1 Answers1

11

I had the same issue. My problem was the Google Maps SDK for iOS wich was not enabled :/

So be carefull of the API key (and the associated bundle ID) and check if the right API is activated.

Greensource
  • 221
  • 2
  • 9