بررسی اجمالی مهاجرت

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.

بهترین شیوه‌های صدور صورتحساب برای مهاجرت

این راهنمایی در صورتی اعمال می‌شود که استفاده از API شما به اندازه‌ای بالا باشد که به قیمت‌گذاری سطح دوم روی بیاورید. هنگام مهاجرت به نسخه جدیدتر API، هزینه SKU متفاوتی نیز برای شما محاسبه می‌شود. برای جلوگیری از افزایش هزینه‌ها در طول ماه انتقال، توصیه می‌کنیم تا حد امکان نزدیک به ابتدای ماه به APIهای جدید در حال تولید تغییر دهید. این کار تضمین می‌کند که در طول ماه مهاجرت به مقرون‌به‌صرفه‌ترین سطوح قیمت‌گذاری ماهانه دسترسی پیدا کنید. برای کسب اطلاعات در مورد سطوح قیمت‌گذاری، به صفحه قیمت‌گذاری و سوالات متداول قیمت‌گذاری مراجعه کنید.

Error: kGMSPlacesRateLimitExceeded

Places API (New)

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 (جدید) برای پوشش ترافیک فعلی شما در 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)

If you have a negotiated agreement, check that it covers Places API (New), with the expected pricing. If not, contact your Sales contact at Google or your partner to discuss how you can include this API.

تغییرات کلی

برخی از تغییرات کلی که برای چندین API اعمال می‌شوند عبارتند از:

  • 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.

  • GMSPlacesClient contains new methods to call these new APIs.

  • New classes have been added to define the request to each of the new APIs.

  • The response GMSPlace instance contains the new reviews property of type GMSPlaceReview . When your app displays information obtained from the GMSPlace instance, such as photos and reviews, the app must also display the required attributions.

    برای اطلاعات بیشتر، به مستندات مربوط به انتساب‌ها مراجعه کنید.

تغییرات خاص API

این بخش شامل راهنماهای مهاجرت زیر برای هر API است: