iOS 的地点 API 未启用错误

The Places API for iOS is not enabled error

我无法呼叫这些地方 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.

我已遵循本指南Places API getting started

1) 安装 API(Pod 文件和 pod 安装)

2) 设置 API 密钥并将其限制为 iOS

3) 在AppDelegate中添加key (GMSPlacesClient.provideAPIKey("YOUR_API_KEY"))

但是,我仍然遇到上述错误。

这是正确的API启用吗?

我已经等了 30 多分钟(现在已经超过 17 小时)让 API 键设置生效,但错误仍然存​​在。不过,我可以使用相同的密钥让地图 API 正常工作。

版本:"GooglePlaces (2.7.0)" + iOS12.0

将 Podfile 中的版本从 2.7.0 更新到 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)

刚注意到文档中有一条说明:

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.

虽然它提到它将在 2019 年 7 月 29 日关闭,但显然它现在不起作用。也许我需要恢复代码才能使用以前的版本。