Closed pretheesh closed 5 years ago
I have the same issue.
Maybe update the Pods to 3.0.3 as mentioned here ?
Or could it be some error with my Places API key? I enabled Places API in the dashboard, so should be ok.
all these show the same error. Only @derTuca can help us :)
@pretheesh did you try with an older Flutter version?
Just checked the example project with my API keys and it works fine. I would suggest making sure not only that iOS keys are created, BUT ALSO that the API is enabled (if you can see it here it is not enabled). Please double-check and comment again if the issue still persists. Also, the plugin does not enforce a specific version of the pods, so a pod update
should get them up to date.
@derTuca do you need to create a restricted iOS spesific key? ( unrestricted does not work? )
i was using a unrestricted key, but it should be enabled.
An unrestricted key should work fine, but it is very important that the SDK is enabled, per the link above.
Places API are enabled. Maps and Geolocation API's also. Maybe an old API key is cached or something. WIll try to delete DerivedData folder and check API keys later.
Did you notice the deprication warning @derTuca ?
It says:
Notice: The Place Picker (Android, iOS) is deprecated as of January 29, 2019. This feature will be turned off on July 29, 2019, and will no longer be available after that date. To continue using the Place Picker with Places SDK for iOS v.2.7.0 through the deprecation period, do NOT disable the Places SDK for iOS. Read the migration guides (Android, iOS) to learn more.
There is also a migration guide.
When i go to the link you supplied i can see the Places API
listed, but when i press it, it says Enabled
.
Also when i delete the Podfile.lock
and do a pod install
, it seem to install the 2.7.0
version, even when i do a pod outdated
it says the latest version is 3.0.3
. I try to do a pod update
with no result.
@derTuca
@derTuca could you supply a full working example. And perhaps created a temp valid Places Api key i could test?
I somehow managed to run the autocomplete.
The places picker still doesn't work, but the autocomplete works. I don't know what is wrong.
Per the migration guide, as mentioned above by @erf, updating the pods to the latest version will prevent the Place Picker from working, as that feature has been removed. I am currently a tad short on time, but I will update the plugin this weekend (hopefully) to mark the place picker as deprecated and update the docs respectively.
This client migration url says that
The v.3.0.0 release of the Places SDK for iOS has been updated with new functionality. The current version of the Places SDK for iOS (v.2.7.0) is deprecated as of January 29, 2019, and will be turned off on July 29, 2019.
Do you plan to update to v3.0.0 @derTuca ?
I will keep the current version on a separate branch and update the master for the new version of the plugin, most likely, along with a new major version for the plugin.
@pretheesh the guide says the following:
Prior to using the Places SDK for iOS, do the following:
Get an API key with iOS restrictions (not browser restrictions). You can use the same API key for your Maps SDK for iOS apps and your Places SDK for iOS apps.
Enable billing on each of your projects.
Enable the Places API service in Google Cloud Platform Console for each of your projects.
Did you try to restrict to iOS and enable billing?
Ok, so I updated the plugin in order to use v3 of the Places SDK. Also, regarding the 2.7 pod being used even after pod update, it was due to the plugin having the deployment target set to iOS 8.0, while the minimum version for the v3 of the Places SDK is 9.0. Please follow the instructions in the docs and hit me up if the problem still occurs.
@derTuca thanks for the update!
I managed to get the autocomplete working ( on iOS ) after i deleted the Podfile.lock
and the Pods
folder, so that so that the 3.0.3
libraries were installed.
I wish the map picker functionality was still there, are you planning on recreating this? perhaps using google_maps_flutter and geolocator?
@erf Unfortunately I'm really short on time right now, and that is out of my required scope for the moment. If you (or anybody else) would like to do that though, I'd be more than willing to help.
@derTuca No worries. I might recreate this functionality myself, but then i probably won't be using the places SDK, or your plugin, but rather build something from scratch using the two mentioned flutter packages, as the autocomplete functionality is probably not for building upon.
I am getting below error. places API is configured properly on cloud console. I can see google places version as 2.7 and I remeber reading this version is deprecated on 29th January. I tried everything on the error described below but no luck so far.
What could be the problem? Can someone help?
preview here: https://gph.is/g/4wzNbDZ
Places API error: Error Domain=com.google.places.ErrorDomain Code=-9 "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." UserInfo={NSLocalizedFailureReason=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., NSUnderlyingError=0x2818514a0 {Error Domain=com.google.places.server.ErrorDomain Code=-1 "(null)" UserInfo={NSUnderlyingError=0x281853690 {Error Domain=com.google.GTLRErrorObjectDomain Code=403 "Access Not Configured. Google Places API for iOS has not been used in project xxxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/placesios.googleapis.com/overview?project=xxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
UserInfo={GTLRStructuredError=GMSx_GTLRErrorObject 0x2818510e0: {message:"Access Not Configured. Google Places API for iOS has not been used in project xxxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/placesios.googleapis.com/overview?project=xxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry." errors:[1] code:403}, NSLocalizedDescription=Access Not Configured. Google Places API for iOS has not been used in project xxxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/placesios.googleapis.com/overview?project=xxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.}}}}} [VERBOSE-2:shell.cc(184)] Dart Error: Unhandled exception: PlatformException(PLACE_PICKER_ERROR, 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., null)
0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:551:7)
1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:292:18)