Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing google places autocomplete API in iOS

This is my first time that I am using Google API. I am having problem implementing Google places auto-complete API in my project. I am using the Google developers link to Google Places Autocomplete API as reference.

I am able to implement the this tutorial correctly, however, I am unable to implement this in iOS.

Can someone please direct me to some tutorial in this regard? Basically I want to do the following:

When the user enters a text in UITextField,

  • the URL string gets the text (which I have done successfully),
  • a filtered array is populated
  • the elements of the array are shown in a drop-down menu type thing just like in auto-completion link above.

Any help is in this regard will be highly appreciated. I am stuck on this problem for the past week.

like image 859
Sehrish Khan Avatar asked Jun 18 '12 12:06

Sehrish Khan


2 Answers

Check out https://github.com/spoletto/SPGooglePlacesAutocomplete

It's an objective-c wrapper for the Google Places Autocomplete API.

Good Luck!

like image 163
Amit Avatar answered Nov 02 '22 02:11

Amit


And here's a Swift version :)

https://github.com/watsonbox/ios_google_places_autocomplete

like image 5
Howard Wilson Avatar answered Nov 02 '22 03:11

Howard Wilson