ios - 在 Google Cloud Platform 中启用 Places API for iOS
问题描述
我正在尝试添加Place Autocomplete
iOS 应用程序,但总是出现此错误。
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 for iOS
在 Google Cloud Platform 中活动,但该选项未出现在 API 库列表中。有人知道为什么吗?我在 StackOverflow 中看到过不同的教程和帖子,但没有人解释原因。
我不知道我的帐户是否需要一些配置。
请参阅随附的屏幕截图。
如您所见Places API for iOS
,不在列表中。
解决方案
我也遇到了这个问题,但发现这个答案很有帮助。
问题是GooglePlaces pod
没有更新。当我们运行pod 时会自动设置版本pod install
,但最新的是版本。GooglePlaces
2.7.0
3.0.2
尝试pod update GooglePlaces --verbose
时pod
不会正确更新,所以我最终直接将版本设置为podfile
:
# Pods for myProject
pod 'Alamofire', '~> 4.7'
pod 'GoogleMaps', '~> 3.0.2'
pod 'GooglePlaces', '~> 3.0.2'
然后pod install
再次运行,“api未启用”错误消失了。
推荐阅读
- c# - 我的签名结构干扰了使用 itext7 嵌入签名
- google-apps-script - 从电子表格列自动填充表单选项
- python - 如何从包含具有相同单词的行数的文件中仅提取一次给定单词的行
- reactjs - React 路由器需要几秒钟来路由
- android - 如何在单个 recyclerView 中设置两个不同的适配器?
- matlab - 如何在 Matlab 中制作具有 30 种可区分颜色的颜色图
- flutter - FadeInImage.assetNetwork 小部件中的错误处理如何?
- c++ - 如何使用循环从另一个字符串创建一个没有空格的新字符串
- javascript - 如何在axios.get中调用functionA并返回值
- java - 如何在 MySQL 数据中将 jlist 作为单个块插入