You're all set!

To start developing, please head over to our developer documentation.

Activate the Google Places API for iOS

To get you started we'll guide you through the Google Developers Console to do a few things first:

  1. Create or choose a project
  2. Activate the Google Places API for iOS
  3. Create appropriate keys
Continue

<GMSAutocompleteTableDataSourceDelegate> Protocol Reference

<GMSAutocompleteTableDataSourceDelegate> Protocol Reference

Overview

Protocol used by GMSAutocompleteTableDataSource, to communicate the user's interaction with the data source to the application.

Public Member Functions

(void) - tableDataSource:didAutocompleteWithPlace:
 Called when a place has been selected from the available autocomplete predictions.
(void) - tableDataSource:didFailAutocompleteWithError:
 Called when a non-retryable error occurred when retrieving autocomplete predictions or place details.
(BOOL) - tableDataSource:didSelectPrediction:
 Called when the user selects an autocomplete prediction from the list but before requesting place details.
(void) - didUpdateAutocompletePredictionsForTableDataSource:
 Called once every time new autocomplete predictions are received.
(void) - didRequestAutocompletePredictionsForTableDataSource:
 Called once immediately after a request for autocomplete predictions is made.

Member Function Documentation

- (void) tableDataSource: (GMSAutocompleteTableDataSource *)  tableDataSource
didAutocompleteWithPlace: (GMSPlace *)  place 
[required]

Called when a place has been selected from the available autocomplete predictions.

Parameters:
tableDataSourceThe GMSAutocompleteTableDataSource that generated the event.
placeThe GMSPlace that was returned.
- (void) tableDataSource: (GMSAutocompleteTableDataSource *)  tableDataSource
didFailAutocompleteWithError: (NSError *)  error 
[required]

Called when a non-retryable error occurred when retrieving autocomplete predictions or place details.

A non-retryable error is defined as one that is unlikely to be fixed by immediately retrying the operation.

Only the following values of GMSPlacesErrorCode are retryable:

  • kGMSPlacesNetworkError
  • kGMSPlacesServerError
  • kGMSPlacesInternalError

All other error codes are non-retryable.

Parameters:
tableDataSourceThe GMSAutocompleteTableDataSource that generated the event.
errorThe NSError that was returned.
- (BOOL) tableDataSource: (GMSAutocompleteTableDataSource *)  tableDataSource
didSelectPrediction: (GMSAutocompletePrediction *)  prediction 
[optional]

Called when the user selects an autocomplete prediction from the list but before requesting place details.

Returning NO from this method will suppress the place details fetch and didAutocompleteWithPlace will not be called.

Parameters:
tableDataSourceThe GMSAutocompleteTableDataSource that generated the event.
predictionThe GMSAutocompletePrediction that was selected.

Called once every time new autocomplete predictions are received.

Parameters:
tableDataSourceThe GMSAutocompleteTableDataSource that generated the event.

Called once immediately after a request for autocomplete predictions is made.

Parameters:
tableDataSourceThe GMSAutocompleteTableDataSource that generated the event.

Send feedback about...

location_on
Google Places API for iOS