This section describes how to verify your system meets the minimum requirements,
set up your Workspace Group, and get the Driver SDK.

## Before you begin

The Driver SDK for iOS requires your app to meet the following criteria:

- Have the Navigation SDK.
- Enable the Maps SDK for iOS in your Google Cloud console and get an API key.

## Check the minimum system requirements

Check the release notes for the minimum requirements for the version of the
Driver SDK you are using. See [Release notes](https://developers.google.com/maps/documentation/mobility/services/resources/relnotes_driver_sdk_ios.md.txt).

- The mobile device must be running iOS 16 or later.
- Apple [Xcode](https://developer.apple.com/xcode/) **version 26** or later.

## Get access to your Google Workspace

**If you are a Google Workspace customer,** perform the following steps:

1. Create a Workspace Group. For more information, see [Workspace Group](https://support.google.com/a/answer/33329).

   For example, as a best practice, name your group
   `google-maps-platform-sdk-users@workspacedomain.com` during onboarding.
2. Provide the name to Google to add your Workspace Group to an allowlist that
   grants access to the correct CocoaPods repositories.

3. Confirm that the user emails and service account emails that need access are
   included in this list.

**If your organization cannot create Workspace Groups,** send Google a list
of user and service account emails that need access to these artifacts.

> [!NOTE]
> **Note:** Workspace Groups are **not** the same as Google Groups, which end in `@googlegroups.com`. Only Workspace Groups are supported.

### Sign in with the Cloud SDK

For local development, sign in with the Cloud SDK. For details, see [Install the gcloud CLI](https://cloud.google.com/sdk/docs/install).

The following examples show how to sign in with the Cloud SDK.

### gcloud

    gcloud auth login

You must use an email that is a member of the Workspace Group.

#### Set up your automation hosts

For build systems or continuous integration, set up your automation hosts based
on the provided list of methods for using a service account to authenticate to
Google APIs and services. For details, see the [service account section](https://cloud.google.com/docs/authentication/production#best_practices)
in the Authentication methods at Google page.

- If your process runs inside a Google Cloud environment, use
  automatic credential detection. For more information, see [automatic credential detection](https://cloud.google.com/docs/authentication/production#automatically).

- Otherwise, store the service account key file in a secure location on the
  host's file-system and set the GOOGLE_APPLICATION_CREDENTIALS
  environment variable appropriately. For more details, see [GOOGLE_APPLICATION_CREDENTIALS](https://cloud.google.com/docs/authentication/production#passing_variable).

The service account email associated with the credentials must be a member of
the Workspace Group.

## Get the Driver SDK

Install and configure the Driver SDK.

### CocoaPods

1. **Install the CocoaPods tool**: Open a terminal window and run the following
   command.

   ```bash
   sudo gem install cocoapods
   ```

   For more details, refer to the [CocoaPods Get Started guide](https://guides.cocoapods.org/using/getting-started.html).
2. **Create a Podfile for the Driver SDK**: You use the Podfile to install
   the API and its dependencies.

   1. Create a file named `Podfile` in your project directory.
      This file defines your project's dependencies.

   2. Edit the Podfile and add your dependencies. Here is an example which
      includes the dependencies:

      ```bash
      source "https://github.com/CocoaPods/Specs.git"

      target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
        pod 'GoogleRidesharingDriver'
      end
      ```

      Here is an example which includes the Alpha and Beta pods for the
      Driver SDK as dependencies:

      ```bash
      source "https://cpdc-eap.googlesource.com/ridesharing-driver-sdk.git"
      source "https://github.com/CocoaPods/Specs.git"

      target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
        pod 'GoogleRidesharingDriver'
      end
      ```
   3. **Save the Podfile**: Open a terminal and go to the folder with the
      Podfile:

      ```bash
      cd <path-to-project>
      ```
3. **Run the pod install command**: This command will install the APIs
   specified in the Podfile, along with any dependencies they may have.

   ```bash
   pod install
   ```
4. **Open your project in Xcode**: Close Xcode, and then open
   (double-click) your project's .xcworkspace file to launch Xcode. To open
   the project later, use the .xcworkspace file.

   > [!NOTE]
   > **Note:** Periodically run `pod outdated` to detect when there's a newer version of the SDK. For more information, see [Driver SDK for iOS Versions](https://developers.google.com/maps/documentation/mobility/driver-sdk/on-demand/ios/versions.md.txt).

### Swift Package Manager


The Driver SDK can be installed via [Swift Package Manager](https://developer.apple.com/documentation/xcode/swift-packages). To add the SDK, ensure you have
removed any existing Driver SDK dependencies.


To add the SDK to a new or existing project, follow these steps:

1. Open your Xcode `project` or `workspace`, then go to **File \> Add Package Dependencies**.
2. Enter <https://github.com/googlemaps/ios-driver-sdk> as the URL, press **Enter** to pull in the package, and click "Add Package".
3. To install a specific `version`, set the **Dependency Rule** field to one of the version-based options. For new projects, we recommend specifying the latest version and using the "Exact Version" option. Once complete, click "Add Package".
4. From the **Choose Package Products** window, verify `GoogleRidesharingDriver` will be added to your designated `main` target. Once complete, click "Add Package".
5. To verify your installation, navigate to your target's **General** pane. In the **Frameworks, Libraries, and Embedded Content** you should see the installed packages. You can also view the "Package Dependencies" section of "Project Navigator" to verify the package and its version.

To update the `package` for an existing project, follow these steps:

1. From Xcode, go to **File \> Packages \> Update To Latest Package Versions**.
2. To verify your installation, go to the **Package Dependencies** section of **Project Navigator** to verify the package and its version.

**Important:** Sometimes, artifacts cannot be resolved or errors can occur, in this case select "File \> Packages \> Reset Package Cache".

<br />

<br />

To remove the existing Driver SDK installed
manually, follow these steps:

1. From your Xcode project configuration settings, find **Frameworks,
   Libraries, and Embedded Content** . Use the **minus sign`(-)`** to remove
   the following framework:

   - `GoogleRidesharingDriver.xcframework`
2. From the top level directory of your Xcode project, remove the
   `GoogleRidesharingDriver` bundle.

### Manual installation

This guide shows how to manually add the XCFramework containing the
Driver SDK to your project and configure your build settings in Xcode.

> [!CAUTION]
> **Caution**: As a best practice, use Cocoapods to install the Driver SDK whenever possible.

Before following this guide, do the following:

- Download the XCFramework, a binary package that you use to install the
  Driver SDK. You can use this package on multiple platforms, including
  machines using [Apple silicon](https://support.apple.com/en-us/HT211814)

- Install the [Navigation SDK](https://developers.google.com/maps/documentation/navigation/ios-sdk/config#install-the-sdk).

Perform the following steps to manually install the Driver SDK:

1. Download the SDK binary and resources:

   - [GoogleRidesharingDriver.xcframework](https://dl.google.com/geosdk/swiftpm/11.1.0/GoogleRidesharingDriver_3p.xcframework.zip)
   - [GoogleRidesharingDriver.bundle](https://dl.google.com/geosdk/swiftpm/11.1.0/GoogleRidesharingDriver.zip)

   <br />

2. Unpack the zipped files to access the XCFramework and resources.

3. Start Xcode and either open an existing or create a project. If you're
   new to iOS, create a new project and select the iOS App template.

4. If your project group does not contain a Frameworks group, create it.

5. To install the Driver SDK, drag the
   `GoogleRidesharingDriver.xcframework` file into your project under
   **Frameworks, Libraries, and Embedded Content** . If prompted, select
   **Copy items**.

6. Drag the downloaded `GoogleRidesharingDriver.bundle` into the top-level
   directory of your Xcode project. If prompted, select **Copy items**.

7. Select your project from the Project Navigator, and choose your
   application's target.

8. Open the **Build Phases** tab, and in **Link Binary with Libraries**, add the
   following frameworks and libraries if they are not already present:

   - `Accelerate.framework`
   - `AudioToolbox.framework`
   - `AVFoundation.framework`
   - `CoreData.framework`
   - `CoreGraphics.framework`
   - `CoreLocation.framework`
   - `CoreTelephony.framework`
   - `CoreText.framework`
   - `GLKit.framework`
   - `ImageIO.framework`
   - `libc++.tbd`
   - `libxml2.tbd`
   - `libz.tbd`
   - `LocalAuthentication.framework`
   - `OpenGLES.framework`
   - `QuartzCore.framework`
   - `SystemConfiguration.framework`
   - `UIKit.framework`
   - `WebKit.framework`
9. Choose your project, rather than a specific target, and open the **Build
   Settings** tab. In the **Other Linker Flags** section, add `-ObjC` for
   both debug and release.

   If these settings are not visible, change the
   filter in the **Build Settings** bar from **Basic** to **All**.

## Inspect Apple Privacy Manifest File

Apple requires app privacy details for apps on the App Store. Visit the [Apple App Store Privacy Details page](https://developers.google.com/maps/documentation/ios-sdk/apple-privacy-policy.md.txt) for updates and more information.

The Apple Privacy Manifest file is included in the resources bundle for the SDK. To verify that the Privacy Manifest File has been included, and to inspect its contents, create an archive of your app and [generate a privacy report](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests#4239187) from the archive.

## What's next

[Configure a Google Cloud console project](https://developers.google.com/maps/documentation/mobility/driver-sdk/on-demand/ios/configure-project.md.txt)