0

I upgraded to Google Places API version 9.0.0. I enabled the new API in my cloud.

My code compiled and I am able to see the view controller to search a place.

I can enter a place and select the place from the list.

Once I tap on the place, my app crashes with:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GMSPlacesServiceRequestTransformer transformURLRequest:]: unrecognized selector sent to instance 0x303c16f40'

Here the code to present the search view controller

protocol AddressSearchViewPresenter: GMSAutocompleteViewControllerDelegate {
    
    func presentAutocompleteViewController()
}

extension AddressSearchViewPresenter {
    
    func presentAutocompleteViewController() {
        let autocompleteController = GMSAutocompleteViewController()
        autocompleteController.delegate = self

        // Specify the place field types to return in the result
        let fields: GMSPlaceField = GMSPlaceField(rawValue: UInt64(GMSPlaceField.all.rawValue))
        autocompleteController.placeFields = fields

        // Specify no filter
        let filter = GMSAutocompleteFilter()
        filter.types = []
        autocompleteController.autocompleteFilter = filter

        // Display the autocomplete view controller
        let navigationController = UINavigationController(rootViewController: autocompleteController)
        UIApplication.present(navigationController)
    }
}

Is it possible that what I see is the old Google Places search view controller?

I looked the doc here and I can see it is not like before, but not sure how to integrate it to my actual code. There is nothing indicating a way to have the UI control like before.

Anyone can guide me a little?

Thanks in advance

0

Browse other questions tagged or ask your own question.