Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

Google Maps iOS SDK Tutorial: Getting Started

Learn how to use the Google Maps iOS SDK to retrieve the user's current location and search for nearby points of interest, such as bars and restaurants.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1606-google-maps-ios-sdk-tutorial-getting-started
1 Like

Hey Ron,
Great tutorial thank for this, can you provide demo project in objective-c also.

I have a question. I try to repeat the example.

I go to Terminal and cd to Feed_Me_Starter, as well as to Feed_Me_Starter/Feed_Me.

I print “pod install” and Terminal says me: “-bash: pod: command not found”

I’ve followed your tutorial from the start but I do not see any of the locations appear. When I debug code in GoogleDataProvider.swift and log the result, I found that “placesArray” is empty. What should I do?

Hi Ron - Great tutorial! I successfully followed and have the app working correctly through the Web Service. My question is whether or not you know if the Google Places API for IOS has changed since your writing to allow for direct queries from a mobile app? If not, how is someone supposed to deploy an app or use it outside of localhost? Thanks again!

https://developers.google.com/places/web-service/usage
“Note: If you are using Google Places API Web Service in your Android or iOS app, we recommend that you use the Google Places API for Android or the Google Places API for iOS instead. Note that the usage limits are different on Android and iOS.”

I just scanned this tutorial and it looks helpful for me. My main goal is to let users drop pins and upload photos to that location. Can I take this tutorial a step further to make this happen? Do you have any suggestions on where to learn how to do this?

Hi All. This looks like a great tutorial, however since I am very new to Swift, I am having issues compiling even just the original “Feed Me” code provided due to the Swift 2 to Swift 3 transistion. Does anyone have the new format for all the JSON references? I currently have about 19 errors and haven’t been able to find to many helpful online resources. Perhaps someone could send an update of the original “Feed Me” so I can begin following the tutorial? Thank you!

You forgot to mention the size of Google Maps library is freaking huge and bloats your app size a lot.

Would it be possible to have this tutorial updated for Swift 3 and the current Google Maps API? I’ve managed to get most of it working on my own at this point, however for a beginner this might be more challenging.

Some points to note, from my experience:

  • It seems you only need one API key now
  • It also seems you’re able to call the API methods from a mobile app, so you don’t really need a local server (also means you can run the app on a proper device anywhere). If I’m mistaken on this count, my apologies :slight_smile:

Otherwise, this is a great, easy-to-follow tutorial. Thanks a lot for the hard work and a great resource :slight_smile:

1 Like

Hi aurora14,

I am writing code in Swift 3. But facing a problem that its working good on my simulator but when i tried it on my iPOD, its crashed. Please suggest a solution.

This is the last line executed before crash.

locationManager.startUpdatingLocation()

Many thanks.

Hey aurora, is that correct about not needing a local server? Would be great if that’s the case. I can’t find any more info about that. The google web service api page still has this on it ;

[update]

@joeyslomowitz that’s right. I’ve just finished this tutorial using Xcode 9, and only used one key, and no local server. Well, technically two keys - because one I restricted specifically for iOS app with the bundle, and the other one is unrestricted, but you could probably just use one otherwise. There are a couple of minor changes to accommodate this.

The original urls used to look something like this:
http://localhost:10000/maps/api/place/photo?maxwidth=200&photoreference=(reference)

The one I’m using in my code, on the other hand, is something like this:
https://maps.googleapis.com/maps/api/place/photo?maxwidth=200&photoreference=(reference)&key=replaceWithYourApiKey

  • Note the ‘https’ and the addition of the ‘key’ parameter.

fantastic , works perfectly well ( with minor modifications) , thanks for great tutorial

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]