GMSAutocompleteViewController showing only 5 results

删除回忆录丶 提交于 2019-11-30 15:12:50

I am assuming that you have Google Places API enabled and as well you have no application restrictions under your Google Developer Console for that project. Said that there is a Google page about APIs and billing

  1. Android and iOS Places APIs might differ, and hence for some APIs you might need to enable billing:

    Some APIs allow free usage up to a courtesy usage limit, and in some cases this free limit is increased when you enable billing.

  2. Maybe in your Android App you are using an API linked to a project that has billing enabled and for your iOS App you are using an API linked to another project where billing is not enabled.

    Billing is enabled at the project level, not the API level. If you enable billing for a project, then every billable API in that project is billed, based on the project's usage. All usage in a project is billed using the payment method that you specify, and you can change to a different method at any time. You cannot selectively enable billing for some APIs but not others; when you enable billing for a project, it applies to all the APIs that you used within that project, even if the API is currently disabled.

Maybe something is related to the version of Places SDK you are using in your Android App Project and some of its inner functionality could affect if you are going to talk to their updated APIs version which requires Billing to be enabled or not. Check information stated in Migrating to the New Places SDK Client for this assumption.

Lastly, as stated from lots of documentations from Google in Places SDK for Android, Places SDK for iOS, Places API, they all have a red warning in the beginning of each article saying that in each project you should enable Billing. If all my before statements fails, it might mean that they are applying the rule of Billing and APIs functionality restriction in different batches of users/projects, and hence your android app project might have fall in a batch that still hasn't rolled out to force Billing option enabled.

I experienced a similar problem. Was trying to implement the New Places API from Google to replace the old SDK's Place Picker. After one or two successful calls per day I always started getting the following error:

An error occurred: The operation couldn’t be completed. Operation failed due to exceeding the quota usage limit. See the usage limits guide (https://developers.google.com/places/ios-sdk/usage) for information on usage limits and how to request a higher limit.

I had the Places API enabled in the console and also enabled billing with a valid credit card. Was still getting this error.

The solution was to enable Maps SDK for iOS from the Google Cloud Platform. After that I had no limits to the requests and was getting results every time. Hope that helps someone.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!