Implementing google places autocomplete API in iOS

18,865

Solution 1

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

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

Good Luck!

Solution 2

And here's a Swift version :)

https://github.com/watsonbox/ios_google_places_autocomplete

Solution 3

And another alternative: https://github.com/TarasRoshko/TRAutocompleteView

Can be binded to any existing UITextField in single line of code. Supports customization, configurable. Should be good pick for UITextFields, handles resizing and orientation automatically. I've created it because all existing solutions do not provide simple drop down list for text field, but whole separate views, or even "placeholder text suggestion", sometimes even without a possibility to actually autocomplete.

Share:
18,865
Sehrish Khan
Author by

Sehrish Khan

Updated on July 27, 2022

Comments

  • Sehrish Khan
    Sehrish Khan almost 2 years

    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.