The Places SDK for iOS (New) provides improved performance and a new pricing model, making it worthwhile to update apps that use Places SDK for iOS (Legacy). For more details on comparing features, see Choose your SDK .
Use this guide to understand key differences in Places SDK for iOS (New) compared to Places SDK for iOS (Legacy), along with how to handle necessary changes.
Рекомендации по выставлению счетов при миграции
This guidance applies if your API usage is high enough to move into second-tier pricing. When migrating to a newer version of an API, you're also being billed for a different SKU. To avoid increased costs during the month of your transition, we recommend switching to the new APIs in production as close to the beginning of the month as possible. This will ensure that you reach the most cost-effective monthly pricing tiers during the migration month. For information about pricing tiers, see the pricing page and the pricing FAQ .
Error: kGMSPlacesRateLimitExceeded
API для работы с местами (новый)
Places SDK for iOS relies on the Places API service. To use the features of Places SDK for iOS (New), you must first enable Places API (New) in your Google Cloud project. For more information, see Set up your Google Cloud project .
You then must verify that you have added Places API (New) to the list of authorized APIs on the key used by your app. For more information, see Use API Keys .
Ensure that you have enough quota in Places API (New)
Убедитесь, что в Places SDK для iOS (новая версия) достаточно квоты для покрытия текущего трафика. Чтобы просмотреть и управлять квотами и лимитами использования, см. раздел «Квоты и оповещения о квотах» . Обратите внимание на различия между двумя API:
- The quota for Places SDK for iOS (Legacy) relies on the quota of the Places API service. It is the sum of all Places API methods.
- The quota for Places SDK for iOS (New) relies on the quota of the Places API (New) service. There is a separate quota for each API method.
Check if your negotiated agreement includes Places API (New)
Если у вас есть согласованное соглашение, убедитесь, что оно включает API Places (новый) с указанием ожидаемых цен. В противном случае свяжитесь со своим представителем отдела продаж в Google или с партнером, чтобы обсудить возможность включения этого API.
Общие изменения
Some general changes that apply to multiple APIs include:
Uses a new pricing model. For pricing information for all APIs, see Pricing for the Places SDK for iOS (New) .
Place Details (New) , Nearby Search (New) , and Text Search (New) require field masks to specify which fields you want returned in the response.
GMSPlacesClientcontains new methods to call these new APIs.New classes have been added to define the request to each of the new APIs.
The response
GMSPlaceinstance contains the newreviewsproperty of typeGMSPlaceReview. When your app displays information obtained from theGMSPlaceinstance, such as photos and reviews, the app must also display the required attributions.For more information, see the documentation on attributions .
изменения, специфичные для API
This section includes the following migration guides for each API:
- Перенос данных о местоположении (новое)
- Переезд на новое место для фотосъемки
- Переход на автозаполнение (новая функция)