Google Directions API not returning results on iOS
I am trying to use the Google Directions API. I have my SDK configured. I have enabled the Google Maps iOS SDK in Services in the developer console. Below is the url I created to get directions.
There are two types of keys in the developer console.
I first tried with Key for iOS apps.
https://maps.googleapis.com/maps/api/directions/json?origin=-37.814107,144.96328&destination=-31.953004,115.857469&key=<Key for iOS apps>
But I got an error . This IP, site or mobile app is not authorized to use this API key .
When I was looking for a solution to this error, I saw in several StackOverflow answers ( 1 , 2 ) that iOS keys are not supported. In the answers they talk about the Google Places API but I thought it might be the same case with Directions because the error was the same.
So, I replace Key for iOS Apps with Key for Browser Apps and run it again, but I got a new error . This API project is not authorized to use this API. Make sure this API is activated in the API Console .
My question is, are there any other APIs that I have to activate in Services to get this to work? These are the other maps related to the Google APIs on the list.
source to share
The API " Google Maps SDK for iOS
" is only for integrating the "Google Maps SDK" ...
If you want to use Directions, you need to "activate" in the Google Console: " Directions API
", also developers.google.com/maps/documentation/directions
Happy coding!
source to share
Are you using https://developers.google.com/maps/documentation/ios/ there is also good documentation. Yes, you need to activate IOS Maps SDK in google api center on login
source to share