The Places API for iOS is not enabled error

二次信任 提交于 2020-01-01 10:48:34

问题


I'm not able to call the places API

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.

I've followed this guide Places API getting started:

1) Install the API (Pod file and pod install)

2) Setup the API Key and restrict it to iOS

3) Add the key in AppDelegate (GMSPlacesClient.provideAPIKey("YOUR_API_KEY"))

However, I'm still hitting the above-mentioned error.

Is this the correct API to enable?

I've waited for more than 30 mins (more than 17 hours now)for the API key settings to take effect but the error still persist. I'm able to use the same key to get Maps API to work though.

Version: "GooglePlaces (2.7.0)" + iOS12.0


回答1:


Works after updating the version in Podfile from 2.7.0 to 3.0.3

  pod 'GooglePlaces', '= 3.0.3'
  pod 'GooglePlacePicker', '= 3.0.3'
  pod 'GoogleMaps', '= 3.0.3'

Installing GoogleMaps 3.0.3 (was 2.7.0)

Installing GooglePlaces 3.0.3 (was 2.7.0)

Just noticed there's a note in the documentation which states:

IMPORTANT: The Place Picker 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. To continue using the Place Picker through the deprecation period, do NOT migrate to the new SDK yet, and do NOT disable the Places SDK for iOS service in your Google Cloud Platform project, as doing so will also disable the Place Picker.

Apparently it's not working now although it mentioned that it will be turned off on July 29, 2019. Perhaps I need to revert the code to use the prior version.



来源:https://stackoverflow.com/questions/54910046/the-places-api-for-ios-is-not-enabled-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!