28

I've implemented the "Getting the Google Maps SDK for iOS" step by step

finally the simulator running ok no errors found but the map has no details except the marker.

As showing in the picture:

Screnshot of simulator

Also the output on the bottom has this message:

2012-12-23 01:06:59.869 GogleMap[3680:c07] GMSZoomTableQuadTree lacks root zoom table for >tile type (mapType: 10) 2012-12-23 01:07:00.042 GogleMap[3680:1b03] Google Maps SDK for iOS version: 1.0.1.1154 2012-12-23 01:07:00.375 GogleMap[3680:c07] ClientParametersRequest failed, 3 attempts >remaining. Error Domain=DASHConnectionError Code=100 "The operation couldn’t be completed. (DASHConnectionError error 100.)"

Help please and thanks in advance.

4
  • Have you tried running it on an actual device to see if that does anything?
    – Yo_Its_Az
    Dec 23, 2012 at 2:12
  • hey, how did you follow the steps? i applied for API key access at console and no response yet, other than that, as given in the steps, where did you find the "Google Maps SDK for iOS" to enable it in the services.
    – DD_
    Dec 26, 2012 at 4:18
  • How much time will it take to show Map. Jan 5, 2016 at 12:09
  • This worked for me stackoverflow.com/a/37459488/4034301
    – user4034301
    May 26, 2016 at 11:25

21 Answers 21

63

Solved: I think we've all skipped a small but very important step in the process.

To get started, enable the Google Maps SDK for iOS service in the Google APIs Console alongside other Google APIs.

enter image description here

Once you enable GoogleMap SDK for iOS in the Google APIs Console, your app will correctly load the tiles on the next run.

1
  • 3
    It's 2019 and the same thing still happens, you set everything on the credential page for the ios SDK and it does not make any reminder that you have to also enable the SDK Jan 27, 2019 at 22:18
8

@user1924208 I am having the same issue. I have searched the internet tirelessly for the answer and unfortunately I think we are out of luck. The Google API Console is probably showing you the API key for Google Maps v.3 which is NOT the Google Maps iOS API key. Therefore when you use that as your API key, the validation request will always fail.

It seems as if they haven't issued many API keys for the iOS version for whatever reason. As frustrating as it is, you will just need to wait until you receive an email from them (not really sure when that will be...).

You can confirm this because replacing the current API key with any random string will produce the same results. By the way, this also produces the same results both on simulator and on a real device, which I have tested.

Update

I just got an email from Google Maps that my API key is now available. I switched out the MKMapKit with GMSServices and things are working. It seems like they are a little more comfortable with releasing API keys now so hopefully you will get yours very soon.

4
  • how did you follow the steps? i applied for API key access at console and no response yet, other than that, as given in the steps, where did you find the "Google Maps SDK for iOS" to enable it in the services.
    – DD_
    Dec 26, 2012 at 4:18
  • I also did not find the "Google Maps SDK for iOS" key. It seems that this is something that gets unlocked from your Google API Console when they contact you with access privileges.
    – manderson
    Dec 27, 2012 at 20:07
  • yeah..me too think so!..strange
    – DD_
    Dec 28, 2012 at 9:57
  • Come on. Is it really need an app to be placed to app store. I just want nothing but to learn about the SDK. Therefore, I have input the Application Name: HelloWorld in the register form. Is it the reason why I cannot get the response?
    – Yeung
    Jan 7, 2013 at 3:25
6

Heads up, make sure you've also enabled "Google Maps SDK for iOS" in the Services tab.

I was getting a similar error till I realized I had only generated an API key but forgot to enable the service. Solved my issue.

SDKDemos[160:907] ClientParametersRequest failed, 0 attempts remaining (0 vs 5). 
Error Domain=com.google.Maps.GMSDASHConnection Code=100 
"The operation couldn’t be completed. (com.google.Maps.GMSDASHConnection error 100.)"
3

I had a similar problem, but I was sure that the API key was good because the example project from the SDK package worked with that key - bundle ID pair I used in the actual app. The latest (1.2) version of the sdk actually logs out a warning if your API key does not seem to be valid. The reason it failed to display the map was that I did not fill in a build number in target summary tab of the project settings. Turns out you absolutely need to have CFBundleVersion set in your Info.plist for the google map to work, otherwise the map just stays blank with no errors or warnings shown or even web requests being made.

2
  • 1
    I had to change the build number even though it was already in there. Then it worked. Whatever. Thanks! Jul 19, 2013 at 18:01
  • Thank you! This was driving me crazy! The CFBundleVersion in my info plist wasn't getting properly populated.
    – Tyler
    Aug 5, 2013 at 13:01
2

I had same problem. I think the problem is my "bundle indentifier" of my project is different from one of bundle identifiers in my Google APIs Console.

So I add more bundle indentifer for my Google APIs Console: select your project itself from the Project Navigator, and choose your application's target. In tab Summary, remember your string in Bundle Identifier.

Go to Google APIs Console page, select API Access pane in the console, locate the section Key for iOS apps, select Edit allowed iOS apps...and add your bundle indentifer that you remember above. Rerun your project and done!

2

Just make sure Location is enable from

Simulator options Features->Location->Apple

enter image description here

1

This error is indicative of an invalid key used to initialize the Google Maps:

[GMSServices provideAPIKey:@"YOUR_API_KEY"];

The key is issued by Google specifically for the iOS SDK (apparently only to a few chosen ones); the keys for Google Maps SDK v2 and v3 would not work on Apple.

A way to confirm that the error is indeed caused by an invalid key is via displaying a pushpin. Pushpin does not require a valid key, so it will be visible on an empty map view object. Coding the example from the Getting Started page https://developers.google.com/maps/documentation/ios/start#add_a_map should result in the app displaying an empty map view (with yellowish background and a pushpin at the center).

The best way to guarantee the pin is visible is to use exactly the same coordinates for both the camera and the marker, see the snippet:

GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:43.65
                                                        longitude:-79.45
                                                             zoom:6];

mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];

mapView_.myLocationEnabled = YES;
self.view = mapView_;

GMSMarkerOptions *markerOptions = [[GMSMarkerOptions alloc] init];
markerOptions.position = CLLocationCoordinate2DMake(43.65, -79.45);
markerOptions.title = @"Greater Toronto Area";

[mapView_ addMarkerWithOptions:markerOptions];
1

I was having the same problem, then i went to the google console and clicked on "Generate new key" and the the new key Worked!

1

Make sure you havn't changed your

[bundle identifier]

for the app. It should match with the one you used when generating API keys.

1

Following up on this from a different angle:

There was a bug in later versions of the Google Maps framework that prevented maps from being able to be instantiated/created/added to superview if the app was in the background.

When you did that, the resulting map would show up as completely blank other than the Google logo in the bottom left. The reason for this is because OpenGL rendering is not allowable by the OS while backgrounded; they just needed to restart the renderer once it was foregrounded.

Google has finally fixed this (after about a year) so please upgrade to the latest and greatest.

If you use Google for Business:

pod 'Google-Maps-iOS-SDK-for-Business', '~> 1.11.1'

A repro of this issue is here for older versions.

Visual repro:

OpenGL Bug

3
  • Are there different SDK's for the free and business plans? I'm asking because I started a project for my company using my personal account until purchasing approved the service contract with Google. Once they did that I got our company key and put that in the app. On the sim everything works fine but on the device I get the brown screen of death. I log the bool returned from provideAPIKey and it's yes each time. The bundle is correct in the console. I can get Directions and GeoCode services to work but I can't get a map to display.
    – PruitIgoe
    Mar 2, 2016 at 18:09
  • @PruitIgoe Yes, there are different SDKs for regular versus business customers and there are different websites to set up each as well
    – iwasrobbed
    Mar 10, 2016 at 19:32
  • 1
    Thanks, I finally figured that out. I have to say that I am totally unimpressed with the UI/UX of the Google developer console. It's really not intuitive at all and just a pain to navigate around.
    – PruitIgoe
    Mar 14, 2016 at 16:04
1

Important: If you want to practice on google maps from iOS devices then just download the GoogleMaps.framework.

Unknowingly I have downloaded GoogleMapsM4B.framework and faced issues like 'your key may be invalid for your bundle id: com.company.example'

If you want to use GoogleMapsM4B.framework in your project then 1.You should request support on the Enterprise Support portal(Google's website) 2.You must enable Google Maps Mobile SDK for Work not Google Maps SDK for iOS in Google’s console website.

Incase if you want to use GoogleMaps.framework not GoogleMapsM4B(Maps for Business) then you need not request support center, you just need to enable Google Maps SDK for iOS in Google's console website.

You can find the key differences between the Google Maps SDK for iOS and the Google Maps Mobile SDK for Work(M4B).

and import GoogleMaps/GoogleMaps.h to your file and pass your api key to below method:

[GMSServices provideAPIKey:@“Your API Key“];

(or)

If you have valid license then download GoogleMapsM4B.framework and import GoogleMapsM4B/GoogleMaps.h to your file and pass api to same method [GMSServices provideAPIKey:@“Your API Key“] but I guess you may get this key only after purchasing license.

So the main issue I have faced is... instead of downloading GoogleMaps.framework I have downloaded GoogleMapsM4B.framework and added to my project. Every time I run my project it gave me an error saying "Your key may be invalid for your bundle ID: com.example.sampleapp"

Now my project is working properly.

0
0

Looks like you haven't specified a valid API key. Do you have one?

0

Another heads up! Ensure that your app's bundle identifier matches the bundle id defined in the "iOS apps" field in Google APIs Console.

0

Got the same issue. For sure did everything right. And the thing was that your API key needs some time to get working (maybe information about it propagates through google servers, meaning your closest server could not yet know about the new API key).

So in some 5 minutes after API key creation errors stopped and I have fully working API key. (note, I didn't receive any e-mails from google).

0

This helped me out: (Misspelt API key because XCode originally returned an error unless API was surrounded by {} IOS - ObjC Google Maps Api Key

0

I solved this problem as follows.

  1. Go To Google Maps API Console(Old). Enabled Service was Google Maps SDK for iOS and Google Street View Image API.
  2. I have disabled Google Street View Image API.
  3. And Then, error is no longer output.
0

for me it was due to that my app's bundle identifier has been changed. After taking new API key for the new bundle identifier it start to work again.

0

First thing is make your keys are right. Than check if you have enabled Google Maps SDK for iOS. Than run app on device, rather than a simulator.

0

try not to save API Key on any constants. Directly pass the value. If it is not working try regenerating the API Key Map will work for sure

MapServices.ProvideAPIKey ("AIzaSyAnxfhuAwEqdVhQpoUkGFZpsBukOSXVFr0");

happy coding :)

0

Make sure to enable Maps SDK for iOS in in Google Cloud Console APIs page. After you enable it, restart the app. Google Maps should be shown properly.

-1

Now Apple remove the Google map and Add Apple map,.

Check the Following things:

  1. Decrease Zooming in Map View.

  2. What version iOS Used? if you used iOS 6 the google map not work Apple map must work.

  3. Some times the Simulator not support some core functionalists kindly check the functionality to device.

  4. Make sure the delegate and datasource must set.

Thanks.

1
  • I'm using iOS 6.0 simulator, Google Maps works OK in their app, and many different apps as well iOS 6.0, so this is not the point here. I'll keep trying to find out the problem. I may go through the steps again and see what will happen.
    – Aj-Ksa
    Dec 23, 2012 at 10:41

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