3
votes

So I've started investigating using GoogleMaps iOS SDK.

I followed the instructions:

  • Enabled the Google Maps SDK for iOS in the console
  • Setup an API key and added the Bundle ID (I used the demo Project Google Supplies)
  • Updated the constant 'kAPIKey'the the key in my Project

I run the app and I get the following

2013-11-18 11:24:59.155 SDKDemos[7073:c07] 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=0x8c4b0e0 {data={length = 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}

2013-11-18 11:24:59.233 SDKDemos[7073:6403] Google Maps SDK for iOS version: 1.5.0.5445 ...

2013-11-18 11:25:11.836 SDKDemos[7073:c07] 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=0x8c1a9b0 {data={length = 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}

2013-11-18 11:25:11.836 SDKDemos[7073:c07] Your key may be invalid for your bundle ID: com.example.SDKDemos

Here is an image from the API Console to show I have bundleID entered correctly Console Image

XCode 5.0 iOS SDK 7.0

So it seems I am missing something fairly fundamental here or there is a time I have to wait until my API key is actually activated

Update: Map is now rendering but the ClientParametersRequest failed errors are still being reported

Update2 : Added Image showing example enter image description here

2
Can you walk me through the exact steps to reproduce? I downloaded 1.5, opened the SDKDemo project in Xcode, added an API Key, then ran the project as is in the emulator, and it worked as expected. What did you do? - Brett
I did the exact same thing - CStreel
I just updated the question with a Screenshot of what I am seeing - CStreel
What is your internet connectivity like on your desktop/laptop? A failure mode that could be happening here is that the emulator isn't able to connect with Google servers, and thus can't load map data. - Brett
Connection was fine, We have a project using 1.2 that connects fine the only thing that seemed to be an issue is that the -Objc flag is missing from the Demo project - CStreel

2 Answers

0
votes

Ok so it turns out the Demo Project Supplied by Google didn't follow the proper setup and they skipped step 7

In the Other Linker Flags section, add -ObjC.