Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Places API not enabled for iOS even if it's already enabled

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."

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

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

And in my

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

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.

like image 712
Asmin Ghale Avatar asked Dec 17 '22 18:12

Asmin Ghale


1 Answers

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!!

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

like image 194
Poeto Mateo Avatar answered Apr 02 '23 14:04

Poeto Mateo