Прежде чем вы начнете использовать Places SDK для iOS, вам понадобится проект с платежным аккаунтом и включенным Places SDK для iOS. Дополнительные сведения см. в разделе Настройка в облачной консоли .
Создание ключей API
Ключ API — это уникальный идентификатор, который удостоверяет подлинность запросов, связанных с вашим проектом, для целей использования и выставления счетов. У вас должен быть хотя бы один ключ API, связанный с вашим проектом.
Google настоятельно рекомендует вам ограничить использование ключей API, ограничив их использование только теми API, которые необходимы для вашего приложения. Ограничение ключей 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"]],["Последнее обновление: 2025-03-07 UTC."],[[["This guide explains how to create and restrict API keys for the Places SDK for iOS, enabling authentication and billing for your application."],["You can create API keys using the Google Cloud Console or the Cloud SDK, and you need a project with a billing account and the Places SDK enabled."],["Restricting API keys to your application's needs enhances security by limiting unwarranted requests, with the recommendation to use separate keys for each app and platform."],["For iOS, restriction involves specifying bundle identifiers and enabling the Places API under API restrictions in the Google Cloud Console."],["Once you have your API key, you can proceed to set up and configure your Xcode project for integration with the Places SDK."]]],["This content outlines the process of creating and restricting API keys for the Google Maps Platform, specifically for the Places SDK. Key actions include navigating to the **Google Maps Platform \\\u003e Credentials** page, clicking **Create credentials \\\u003e API key,** and using the Cloud SDK. Restricting keys involves setting application restrictions (e.g., iOS bundle identifier) and API restrictions (e.g., Places API), which is vital for security and to prevent financial charges. Separate keys are encouraged per platform.\n"]]