Google Cloud 콘솔 프로젝트 구성
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Driver SDK용 모바일 앱 프로젝트와 Google Cloud 콘솔 프로젝트를 구성하려면 다음 단계를 따르세요.
- 모빌리티 프로젝트용 Google Cloud 콘솔 개발 프로젝트와 API 키가 없는 경우 이를 설정해야 합니다. 자세한 내용은 Fleet Engine 프로젝트 만들기를 참고하세요.
- Google Cloud 콘솔에서 Fleet Engine에 사용 중인 것과 동일한 Google Cloud 콘솔 프로젝트 및 API 키를 선택합니다.
- API 및 서비스를 선택하고 지도로 필터링한 다음 iOS용 Maps SDK를 검색하여 사용 설정합니다.
프로젝트에 API 키 추가
다음 예에서는 Xcode에서 프로젝트에 API 키를 추가하는 방법을 보여줍니다.
Swift
다음과 같이 API 키를 AppDelegate.swift
에 추가합니다.
다음 import 문을 추가합니다.
import GoogleMaps
import GoogleRidesharingDriver
application(_:didFinishLaunchingWithOptions:)
메서드에 다음을 추가합니다.
GMSServices.provideAPIKey("YOUR_API_KEY")
Objective-C
다음과 같이 API 키를 AppDelegate.m
에 추가합니다.
다음 import 문을 추가합니다.
@import GoogleMaps;
@import GoogleGoogleRidesharingDriver;
application:didFinishLaunchingWithOptions:
메서드에 다음을 추가합니다.
[GMSServices provideAPIKey:@"YOUR_API_KEY"];
다음 단계
인증 토큰 만들기
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eTo use the Driver SDK, you must first set up a Google Cloud console project and an API key for your mobility project if you haven't already.\u003c/p\u003e\n"],["\u003cp\u003eEnsure the same Google Cloud project and API key used for Fleet Engine are selected, and enable the Maps SDK for iOS within the APIs & Services section.\u003c/p\u003e\n"],["\u003cp\u003eIntegrate your API key into your Xcode project by adding it to \u003ccode\u003eAppDelegate\u003c/code\u003e and utilizing necessary import statements (\u003ccode\u003eGoogleMaps\u003c/code\u003e, \u003ccode\u003eGoogleRidesharingDriver\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# Configure a Google Cloud console project\n\nTo configure your mobile app project and Google Cloud console project for the Driver\nSDK, follow these steps:\n\n1. If you don't have a Google Cloud console development project and an API key for your mobility project, you need to set one up. For more information, see [Create your Fleet Engine project](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/create-project).\n2. In the Google Cloud console, select the same Google Cloud console project and API key that you are using for Fleet Engine.\n3. Select **APIs \\& Services** , filter by **Maps**, and then search for and enable the Maps SDK for iOS.\n\nAdd your API key to the project\n-------------------------------\n\nThe following examples show how to add the API key to your project in Xcode: \n\n### Swift\n\nAdd your API key to your `AppDelegate.swift` as follows:\n\n1. Add the following import statements:\n\n import GoogleMaps\n import GoogleRidesharingDriver\n\n2. Add the following to your `application(_:didFinishLaunchingWithOptions:)`\n method:\n\n GMSServices.provideAPIKey(\"\u003cvar translate=\"no\"\u003eYOUR_API_KEY\u003c/var\u003e\")\n\n### Objective-C\n\nAdd your API key to your `AppDelegate.m` as follows:\n\n1. Add the following import statements:\n\n @import GoogleMaps;\n @import GoogleGoogleRidesharingDriver;\n\n2. Add the following to your `application:didFinishLaunchingWithOptions:`\n method:\n\n [GMSServices provideAPIKey:@\"\u003cvar translate=\"no\"\u003eYOUR_API_KEY\u003c/var\u003e\"];\n\nWhat's next\n-----------\n\n[Create authentication tokens](/maps/documentation/mobility/driver-sdk/on-demand/ios/authenticate)"]]