Places SDK for iOS(新版)可提供更出色的性能和新的定价模式,因此值得更新使用 Places SDK for iOS 的应用。如需详细了解如何比较功能,请参阅选择 SDK。
通过本指南,您可以了解 Places SDK for iOS(新版)与 Places SDK for iOS 之间的主要区别,以及如何处理必要的更改。
迁移的结算最佳实践
warning_amber
如果您的 API 用量足够高,达到了第二层级的价格,则适用此指南。迁移到较新版本的 API 时,您还需要按其他 SKU 付费。为避免在过渡月份增加费用,我们建议您尽可能在月初切换到正式版中的新 API。这样可以确保您在迁移月份达到最具成本效益的每月价格层级。如需了解价格层级,请参阅价格页面和价格常见问题解答。
启用 Places SDK for iOS(新)
Places SDK for iOS 依赖于 Places API 服务。如需使用 Places SDK for iOS(新版)的功能,您必须先在 Google Cloud 项目中启用 Places API(新版)。如需了解详情,请参阅设置您的 Google Cloud 项目。
然后,您必须确保已将 Places API(新)添加到应用使用的 API 密钥。如需了解详情,请参阅使用 API 密钥。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-12-22。"],[[["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."]]],[]]