How to make Google's PlacePicker work on iOS? - ios

I followed all the steps mentioned in the guide:
Installed iOS SDKs for GoogleMaps, GooglePlaces, GooglePlacePicker.
Enabled Places API in google console
Created an API key and set them in AppDelegate.(I waited for few hours)
But still I get error:
The Places API for iOS is not enabled. See the developer's guide (https://developers.google.com/places/ios-sdk/start) for how to enable the Google Places API for iOS

Related

Why not signing in causes error "Google Play in-app billing API version is less than 3"

When Google Play has not been signed in, running BillingClient.startConnection() results in BillingResult returned by onBillingSetupFinished() showing billingResult.getDebugMessage():
Google Play In-app Billing API version is less than 3
This error is gone as soon as Google Play is signed in.
Is there a way to get an accurate error for this situation?
The message indicates that you are using a Google Play Developer API that is lower than v3.
The Google Play Developer API will only support the v3 endpoint after 1 December, 2019. Here is the blog post:
https://android-developers.googleblog.com/2019/03/changes-to-google-play-developer-api.html
For more context, the Google Play Billing Library (currently 2.1.0) is the client API used in your Android app.
The Google Play Developer API (currently v3) is the server API used for managing purchases and managing your app on Google Play.

trouble with Google API's?

I have been running google maps and google places API in my app for about a year now. I woke up today and was not able to use the map which was greyed out, or searches. In the console,
ERROR AUTO COMPLETE Error Domain=com.google.places.ErrorDomain Code=-4 "Operation failed due to an invalid (malformed or missing) API key. See the developer's guide (https://developers.google.com/places/ios-sdk/start) for information on creating and using an API key." UserInfo={NSLocalizedFailureReason=Operation failed due to an invalid (malformed or missing) API key. See the developer's guide (https://developers.google.com/places/ios-sdk/start) for information on creating and using an API key., NSUnderlyingError=0x283e81560 {Error Domain=com.google.places.api.server.ErrorDomain Code=-2 "REQUEST_DENIED" UserInfo={NSLocalizedFailureReason=This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/places_backend?project=_, NSLocalizedDescription=REQUEST_DENIED}}}
The thing is all of my API's are called in the right place and I have been able to use maps for a while. Why all of a sudden it stops working?
Recently Google announced the new version of Places SDK client and deprecated the previous one. I believe you should migrate to new version asap, because the deprecated version will stop working very soon.
The new Places SDK client requires that you enable Places API web service in your Cloud project. The error message This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/places_backend?project=_, refers to the Places API web service.
Double check if the Places API web service is enabled, API key created and billing account configured properly.
The official documentation has the following statement
To use the Places SDK for iOS, you must:
Include an API key with all API requests.
Enable billing on each of your projects.
Enable the Places API service for each of your projects
For further details have a look at migration guide:
https://developers.google.com/places/ios-sdk/client-migration
I hope this helps!

Google Directions API failing to return results in iOS

I’m trying to use Google Directions API. I have the SDK all set up. I have enabled Google Maps SDK for iOS under the Services in the developer console. Below is the URL I've built to get the directions.
There are two types of keys in the developer console.
First I tried with the 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 the error This IP, site or mobile application is not authorized to use this API key.
When I searched for a solution to this error I saw in a few StackOverflow answers (1, 2) that iOS keys are not supported. In the answers they're talking about the Google Places API but I thought it might be the same case with Directions because the error was the same.
So I replaces the Key for iOS apps with Key for browser apps and ran it again but I got a new error This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console.
My question is are there any other APIs I have to activate in the Services to get this working? These are the other map related Google APIs in the list.
The API "Google Maps SDK for iOS" - it is only for integrating the "Google Maps SDK"...
If you want to “use” Directions.. you have to “activate” in the Google console: "Directions API” , too developers.google.com/maps/documentation/directions
Happy coding!
Are you using
https://developers.google.com/maps/documentation/ios/ also there is a nice documentation there.
Yes you need to activate the IOS Maps SDK in the google api center when you log in

iOS Google Maps API Key Invalid for Account

I am having issues with my API key for the iOS Google Maps SDK.
Currently I have multiple applications one using the Javascript API, and Android one and now and iOS app. The Web and Android app works fine but I always receive and invalid api key. Bundles are definitely matching and the iOS SDK is enabled under services.
I created an api key on my personal gmail account and linked it to the bundle and it worked fine. Removed it and create the api key back on the console for the other api's and it fails. Has anyone come across this problem before?

Does the Google Analytics SDK use SSL?

Does the SDK for Google Analytics uses SSL, and thus would need an encryption approval letter for use in an iPhone app?
In case their is any confusion, Apple does require an export compliance letter for SSL
It appears to be a NO. How did I arrive at this conclusion? first I found that for Google Analytics to use SSL, it has to send all data to the https: version of google's server. See: https://www.sslshopper.com/article-enable-ssl-for-google-analytics.html . Then I found a blog post where someone monitored google analytics' connection(s) through iOS, and it wasn't using https:.
See: Monitor Google Analytics requests on an iPhone Application and http://jordan.broughs.net/archives/2012/07/monitoring-google-analytics-for-ios.

Resources