Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS with Google Maps

I have integrated Google Maps SDK with iOS using Google Developers Console.

But when I run the app now, It gives me following error.

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=0xb83c2a0 {data=<CFData 0xc13d600 [0xe7a4d8]>{length = 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}

and then it says

Google Maps `SDK` for `iOS` cannot connect or validate APIKey: 
Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. 
(com.google.HTTPStatus error 400.)" UserInfo=0x94bf990 {data=<CFData 0x907df90 [0xe7a4d8]>
{length = 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}

I had requested for the key and I am using the same 40 characters key. I have also tried regenerating the key and then use it. I have searched on net, some people say that "google SDK for iOS" should be enabled in "services". That is also enabled in my case.

But nothing works. Has someone seen the same problem?

like image 854
XYZ Avatar asked Jul 15 '13 13:07

XYZ


People also ask

Is Google map available in iOS?

To download Google Maps for iPhone or iPad, make sure your phone or tablet is on iOS 13.4 and above. Download the latest version of the Google Maps app in the Apple App Store.

How do I use Google Maps instead of Apple Maps on iPhone?

Scroll down to the bottom of the menu and tap Settings. On the Settings screen, tap the Default apps option. Under the Navigate from your location and the Navigate between location sections, tap to select Google Maps.

Is iOS or Google Maps better?

Google Maps is the clear winner for the amount of data present and available. It sources its vast collection of information gathered from businesses, websites, users, and more. Apple Maps has a lot of data too, but even if it uses crowdsourced data similar to Google, it isn't sourcing from as many locations.


2 Answers

My bundle was incorrect. I changed the bundle at Google Maps Console, and then, generate a new key.

like image 191
Lücks Avatar answered Sep 19 '22 05:09

Lücks


You just need to verify if your key is correct and if your bundle identifier is correct in the google api manager ... for this you can check your bundle identifier easily putting this line in some initial viewController viewDidLoad ..

NSLog(@"Current identifier: %@", [[NSBundle mainBundle] bundleIdentifier]);

If everything is okay, and your issue continues, just wait ... the key takes about 1 to 2 hours to get up, and forget that thing about google email you when the key is enabled .. they just don't do it!

like image 31
mariobento Avatar answered Sep 20 '22 05:09

mariobento