即使iOS启用了Places API,也未启用 [英] Places API not enabled for iOS even if it's already enabled

查看:69
本文介绍了即使iOS启用了Places API,也未启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Places Autocomplete或Places API与Maps,Google Login和Firebase RealtimeDatabase集成在一起.但是,当我运行该应用程序时,错误提示: 无法完成该操作.未启用iOS的Places API.请参见开发人员指南(

I have integrated Places Autocomplete or Places API along with Maps, Google Login and Firebase RealtimeDatabase. But when I run the app, the error says: "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."

在以下情况之前,地方工作正常: 上周,我不得不放弃Firebase项目并创建一个新项目. 做了什么要求: -更改了GoogleServices-info.plist -客户编号 -url类型

Places was working fine until: Last week, I had to ditch my Firebase project and create a new one. Did what was required: -changed the GoogleServices-info.plist -client ID -url types

我也已经在我的Google Cloud Platform中启用了Google Places API.

I have already enabled the Google Places API in my Google Cloud Platform, too.

在我的

application(didFinishLaunchingwithOptions:)
GMSServices.provideAPIKey("<key from project>")
GMSPlacesClient.provideAPIKey("<key from project>")

请记住,Google Maps,Google Sign In和Firebase Database都可以正常工作. 该项目也是由android版本共享的,而places api在那里也可以正常工作. 似乎无法找出问题所在.

Bear in mind that Google Maps, Google Sign In and Firebase Database are all working just fine. The project is shared by the android version, too and the places api is working fine there. Can't seem to figure out the issue.

推荐答案

好吧,阿斯敏(Asmin),所以今天早上我遇到了同样的问题,所以我有义务回答,因为我5个小时后就解决了!所以问题出在pod版本上.不推荐使用GooglePlaces 2.7.0,但是当您运行pod install 2.7.0时,系统会安装当前版本3.0.2.一旦我意识到了,这就是我所做的.我打开终端,CD到我的项目文件夹,然后运行pod update或更好的pod update --verbose,这样我就可以看到发生了什么.好吧,它起作用了!!吊舱已更新为3.0.2,现在一切正常.耶!我喜欢/讨厌编程!

Ok Asmin, so i run into the same issue this morning so i feel obligated to answer since i solved it after 5 hours! So the issue is with the pod version. GooglePlaces 2.7.0 is deprecated however when you run pod install 2.7.0 is what is installed not the present 3.0.2. Once i realized that, this is what i did. I opened the terminal, cd to my project folder and run pod update, or better yet pod update --verbose so i can see what's happening. Well, it worked!! The pods got updated to 3.0.2 and now everything works fine. Yaay! I love/hate programming!!

注意:无论如何,如果您尝试了却不起作用,请运行update repo,然后重复pod update.

NB: anyway, if you try it and it doesn't work, then run update repo, and repeat pod update.

你有我的话;它会起作用

You have my word; it's going to work

这篇关于即使iOS启用了Places API,也未启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆