2

UPDATE: Should have read the reference documentation... "A reference to the place picker must be retained for the duration of the place picking operation. If the retain count of the place picker object becomes 0, the picking operation will be cancelled and the callback will not be invoked."

Make sure your placePicker object is referenced in your UITableViewController class:

GOOD: placePicker = GMSPlacePicker(config: config)

BAD: let placePicker = GMSPlacePicker(config: config)

Original Problem:

I have a UIButton element inside of a UITableViewCell in Storyboard connected by IBAction to a function in my UITableViewController.

The function executes when I press the button, and configures the GMSPlacePicker object as instructed in Google's SDK Guide (https://developers.google.com/places/ios-api/placepicker).

Upon calling the pickPlaceWithCallback function, it seems like the Place Picker UI comes up and then immediately closes, taking the user back to the UITableViewController. The callback doesn't run at all so there's no error being passed back to help debug.

Anyone run into this problem?

Jongware
  • 22,200
  • 8
  • 54
  • 100
oz21m
  • 99
  • 1
  • 5

0 Answers0