Configure a Google Cloud console project
Stay organized with collections
Save and categorize content based on your preferences.
To configure your mobile app project and Google Cloud console project for the Driver
SDK, follow these steps:
- 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.
- In the Google Cloud console, select the same Google Cloud console project and
API key that you are using for Fleet Engine.
- Select APIs & Services, filter by Maps, and then search for and
enable the Maps SDK for iOS.
Add your API key to the project
The following examples show how to add the API key to your project in Xcode:
Swift
Add your API key to your AppDelegate.swift
as follows:
Add the following import statements:
import GoogleMaps
import GoogleRidesharingDriver
Add the following to your application(_:didFinishLaunchingWithOptions:)
method:
GMSServices.provideAPIKey("YOUR_API_KEY")
Objective-C
Add your API key to your AppDelegate.m
as follows:
Add the following import statements:
@import GoogleMaps;
@import GoogleGoogleRidesharingDriver;
Add the following to your application:didFinishLaunchingWithOptions:
method:
[GMSServices provideAPIKey:@"YOUR_API_KEY"];
What's next
Create authentication tokens
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-21 UTC."],[[["Set up a Google Cloud console development project and API key for your mobility project if you don't have one already."],["Enable the Maps SDK for iOS within your Google Cloud console project."],["Add your API key to your iOS project (`AppDelegate` file) using the provided code snippets for either Swift or Objective-C."],["After configuration, proceed to create authentication tokens for Driver SDK functionalities."]]],[]]