5

I have a simple iOS app into which I am integrating Google Maps. However, the API key I've provided results in several of these error messages when my map view is displayed:

ClientParametersRequest failed, 3 attempts remaining (0 vs 5). Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" UserInfo=0x1818bf40 {data=<CFData 0x18137410 [0x302aec8]>{length = 145, capacity = 256, bytes = ...}}

Here is what I have already tried to no avail:

  • Calling [GMSServices provideAPIKey:] as the first line of code within didFinishLaunchingWithOptions
  • Double-checking that my API key is correct and is an iOS API key (I copy/pasted it directly from the Google Cloud Console into my app)
  • Providing the API key both with {} and without
  • Confirming my bundle name by outputting it with [[Bundle mainBundle] bundleIdentifier]
  • Omitting bundle identifier restrictions altogether
  • Regenerating the API key

I am not sure what else to try. My bundle name is in this format: net.company.MyApp and I have entered it exactly that way into the Google Cloud Console (I know bundle IDs are case-sensitive).

Could it be that Google doesn't support bundle identifiers of a certain type (e.g., with upper-case letters or beginning with net.)?

1

3 Answers 3

9

You need to enable maps service in Google developer Console. In new layout, choose APIs & auth section and APIs subitem in the left column. Next, in the right one enable Maps SDK for iOS by clicking on the Off button.

0
7

I found the issue. Google Maps SDK for iOS must be enabled for keys to work. I already had Google Maps API v3 enabled and I thought that was enough, but it wasn't.

4
  • 1
    It would be nice if Google prompted me to enable the Google Maps SDK for iOS API as soon as I start generating keys. Nov 18, 2013 at 18:46
  • I faced the same issue and have checked google maps sdk for iOS and bundle identifiers but gives me same error
    – ram2013
    Apr 17, 2014 at 8:45
  • for me it's not working. Please let me know what to do. Jul 17, 2014 at 5:50
  • didn't help me either
    – Jimmy_m
    Aug 15, 2014 at 21:39
2

if you are doing a manual integration of SDK, it is no longer supported in latest version. Also GoogleMapsM4B version needs to be deleted and only keep GoogleMaps SDK in your project. This worked for me.

1
  • Removing GoogleMapsM4B did it for me. Thank you
    – aalesano
    May 24, 2018 at 2:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.