问题
I am getting the error:
Error: The operation couldn’t be completed. The Places API for iOS is not enabled. See the developer's guide (https://developers.google.com/places/ios-api/start) for how to enable the Google Places API for iOS.
Google Account for map services is configured properly, billings etc. already done.
Code used to present:
let autocompleteController = GMSAutocompleteViewController()
autocompleteController.delegate = self
present(autocompleteController, animated: true, completion: nil)
回答1:
The Place Picker for Android and iOS was deprecated in January 2019 and turned off in July 2019. It can't be used anymore. Refer to Google's deprecation notice:
Notice: The Place Picker (Android, iOS) is deprecated as of January 29, 2019. This feature will be turned off on July 29, 2019, and will no longer be available after that date.
You may want to have a look at the public feature request for Place Picker in Google's Issue Tracker: https://issuetracker.google.com/issues/128304760
Also note that there's a new Places SDK for iOS that you need to migrate to if you want to use any of the available Places services (e.g. Place Autocomplete). Follow the steps in Google's migration guide.
Hope this helps.
来源:https://stackoverflow.com/questions/57712397/google-places-picker-not-working-anymore-says-the-places-api-for-ios-is-not-en