3
votes

I plan to have an application to list nearby places in a UITableView with UISearchController combined by Auto-complete feature to filter the result of places and I'm trying to use Google Places API.

I'm confused because I don't know which API should I use:

  • Google Places API Web Service

or

  • Google Places API for iOS

I didn't find a way to get a list of places in the Google Places API for iOS documentation.

  1. When to use Google Places API Web Service and when to use Google Places API for iOS ? and what works best in my case (get list of places with pagination and filter by name and category options)

  2. I have already generated an API-KEY for Google Places API for iOS can I still use this key in Google Places API Web Service ?

1

1 Answers

4
votes

In general, if developing for iOS, you should prefer the Google Places API for iOS. It is designed to be easier to use and more efficient from iOS than using the Web Service.

However, the Places API for iOS is relatively new, and does not yet have all the features of the Web Service. In this case, you might prefer to use only the Web Service, or to combine the Places API for iOS and the Web Service.

For your particular use case, I would recommend using the Places API for iOS getCurrentPlace functionality + Autocomplete. getCurrentPlace returns a list of places where we believe the device to be located.

If that doesn't meet your needs, you could use nearby search from the Web Service + Autocomplete from the iOS API.

For question #2: You cannot use the same API Key for iOS and Web Services. The former requires an iOS Key, and the latter a Server key. You also need to enable both services in the Google Developers Console.