Places SDK for iOS(新版)可提供更出色的性能和新的定价模式,因此值得更新使用旧版 Places SDK for iOS 的应用。如需详细了解如何比较功能,请参阅选择您的 SDK。
通过本指南,了解 Places SDK for iOS(新版)与 Places SDK for iOS(旧版)之间的主要区别,以及如何处理必要的更改。
迁移结算方面的最佳实践
warning_amber
如果您的 API 用量足够高,达到了第二层级的价格,则适用此指南。迁移到较新版本的 API 时,您还需要按其他 SKU 付费。为避免在过渡月份增加费用,我们建议您尽可能在月初切换到生产环境中的新 API。这样可以确保您在迁移月份达到最具成本效益的每月价格层级。如需了解价格层级,请参阅价格页面和价格常见问题解答。
[null,null,["最后更新时间 (UTC):2025-03-04。"],[[["The new Places SDK for iOS offers enhanced performance and a revised pricing model, prompting developers to update their apps."],["To utilize the new SDK, enable the Places API (New) in your Google Cloud project and add it to your app's API key."],["Key changes include a new pricing structure, mandatory field masking for specific APIs, and updated methods and classes within the SDK."],["You need to display attributions when presenting information derived from the `GMSPlace` instance, including photos and reviews."],["Migration guides are provided for Place Details, Place Photo, and Autocomplete to assist developers in transitioning to the new APIs."]]],[]]