Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implement new Google Maps SDK to my iOS app

UPDATE: I've just received an email from Google about the new Google Maps iOS SDK. Seems that everything has sorted out. I have successfully create new API key for my app! Didn't sully test it yet, but seems correct. They sent me this URL page.

Good Luck!


I am trying from yesterday to change my code so be able to use the new Google Maps SDK that released 2 days ago. I have follow all the instructions but until now didn't achieve to display them. I have already request for an API key but without any reply until now. In addition I am trying to get an API key from the Google APIs Console but in list of Services I can't find "Google Maps SDK for iOS".

Secondly, when I am trying to run my app(on Simulator), screen is black, I can see just Google logo on the left-hand side (and press it as well). I am getting these messages on Log screen:

2012-12-14 12:20:57.132 CoL[515:7a03] Google Maps SDK for iOS version: 1.0.1.1154
2012-12-14 12:20:57.132 CoL[515:7a03] New version of Google Maps SDK for iOS available: 1.0.1.1154
2012-12-14 12:20:57.192 CoL[515:c07] ClientParametersRequest failed, 3 attempts remaining. Error Domain=DASHConnectionError Code=100 "The operation couldn’t be completed. (DASHConnectionError error 100.)"
2012-12-14 12:20:57.242 CoL[515:c07] ClientParametersRequest failed, 2 attempts remaining. Error Domain=DASHConnectionError Code=100 "The operation couldn’t be completed. (DASHConnectionError error 100.)"
2012-12-14 12:21:01.291 CoL[515:c07] ClientParametersRequest failed, 1 attempts remaining. Error Domain=DASHConnectionError Code=100 "The operation couldn’t be completed. (DASHConnectionError error 100.)"
2012-12-14 12:21:09.314 CoL[515:c07] ClientParametersRequest failed, 0 attempts remaining. Error Domain=DASHConnectionError Code=100 "The operation couldn’t be completed. (DASHConnectionError error 100.)"
2012-12-14 12:21:13.339 CoL[515:c07] ClientParametersRequest failed, 3 attempts remaining. Error Domain=DASHConnectionError Code=100 "The operation couldn’t be completed. (DASHConnectionError error 100.)"
2012-12-14 12:21:13.363 CoL[515:c07] ClientParametersRequest failed, 2 attempts remaining. Error Domain=DASHConnectionError Code=100 "The operation couldn’t be completed. (DASHConnectionError error 100.)"
2012-12-14 12:21:17.386 CoL[515:c07] ClientParametersRequest failed, 1 attempts remaining. Error Domain=DASHConnectionError Code=100 "The operation couldn’t be completed. (DASHConnectionError error 100.)"

UPDATE: Just noticed that project can't be built successfully on device (iPhone 4S, iOS 6). I don't know if that related with my problem above but here is the error:

ld: file is universal (2 slices) but does not contain a(n) armv7s slice: /Users/.../GoogleMaps.framework/GoogleMaps for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

and how my Architectures section looks like enter image description here

Anyone who has achieved to make it work?

like image 504
OutOfBoundsException Avatar asked Dec 14 '12 12:12

OutOfBoundsException


People also ask

Can I integrate Google Maps in my app?

Android allows us to integrate google maps in our application. You can show any location on the map , or can show different routes on the map e.t.c. You can also customize the map according to your choices.


3 Answers

I have the real answer. So I received access to the SDK as well but it still wasn't working for me. It was showing up as a gray map with a pin on it.

Steps to fix:

Clean your Xcode project. Reset iOS simulator. Close Xcode and simulator. Start up and run.

Obviously make sure you have your api in there, else it wont work at all.

like image 77
barndog Avatar answered Sep 21 '22 07:09

barndog


You need an API key to use the new google maps SDK. This is what mentioned in their page.

Thanks for your interest in the Google Maps SDK for iOS. Currently we're taking applications for access for an API Key. Please provide details about your app below. We'll mail successful applicants when a key becomes available.

So you have to wait till the keys are available.

Check this google maps start page. You can register your project there and it will be available.

For the second issue, check this File is universal (three slices), but it does not contain a(n) ARMv7-s slice error for static libraries on iOS, anyway to bypass?. You might have to remove the support for armv7s from your project.

like image 35
iDev Avatar answered Sep 21 '22 07:09

iDev


In my case, it took four days before I receive activation of my API key for iOS.

After you receive the email from Google, visit again the API Services page, at that time you should be able to see Google Maps SDK for iOS in the list of API Services, then you can now use your given API key for iOS on your project.

Add this code on your AppDelegate 's method application:didFinishLaunchingWithOptions: in your project :

[GMSServices provideAPIKey:@"YOUR_API_KEY"];
like image 26
krischu Avatar answered Sep 21 '22 07:09

krischu