Select platform: [Android](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/android/setup.md.txt "View this page for the Android platform docs.") [iOS](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/ios/setup.md.txt "View this page for the iOS platform docs.") [JavaScript](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/javascript/setup.md.txt "View this page for the JavaScript platform docs.")

<br />

To follow on-demand trips in your iOS consumer apps, use
the Consumer SDK. For more information on and an introduction to following
trips, see
[Follow a trip in iOS](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand.md.txt).

> [!NOTE]
> For examples, see the [iOS sample apps](https://github.com/googlemaps/ios-on-demand-rides-deliveries-samples) or [combined samples](https://github.com/googlemaps/on-demand-rides-deliveries-samples).

To set up the Consumer SDK for your iOS consumer app, follow these steps:

1. [Check the minimum system requirements](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/ios/setup.md.txt#check-min).
2. [Get the Consumer SDK](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/ios/setup.md.txt#install).
3. [Inspect Apple Privacy Manifest file](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/ios/setup.md.txt#inspect-apple).
4. [Configure a Google Cloud Console project](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/ios/configure-project.md.txt).
5. [Get authentication tokens](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/ios/auth-sdk.md.txt).
6. [Initialize the Consumer SDK](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/ios/init-sdk.md.txt).

## Check the minimum system requirements

Check the release notes for the minimum requirements for the version of the
Consumer SDK you are using. See [Release notes](https://developers.google.com/maps/documentation/mobility/services/resources/relnotes_consumer_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 the Consumer SDK

You install and configure the Consumer SDK with CocoaPods.

### Swift Package Manager


The Consumer 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 Consumer 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-consumer-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 `GoogleRidesharingConsumer` 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 Consumer 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:

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

### Use 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 Consumer 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 'GoogleRidesharingConsumer'
      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 installs 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 Consumer SDK Versions in the [Consumer SDK Release notes](https://developers.google.com/maps/documentation/mobility/services/resources/relnotes_consumer_sdk_ios.md.txt).

### Manual installation

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

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

Before following this guide, do the following:

- Download the XCFramework, a binary package that you use to install the
  Consumer SDK. You can use this package on multiple platforms, including
  machines using the M1 chipset.

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

1. Download the SDK binary and resources:

   - [GoogleRidesharingConsumer.xcframework](https://dl.google.com/geosdk/swiftpm/11.1.0/GoogleRidesharingConsumer_3p.xcframework.zip)
   - [GoogleRidesharingConsumer.bundle](https://dl.google.com/geosdk/swiftpm/11.1.0/GoogleRidesharingConsumer.zip)
   - [gRPCCertificates.bundle](https://dl.google.com/geosdk/gRPCCertificates.bundle.zip)

   <br />

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

3. Start Xcode and either open 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. Drag the downloaded `gRPCCertificates.bundle` file into the top-level
   directory of your Xcode project. If prompted, select **Copy items**.

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

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

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

9. 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`
   - `CoreData.framework`
   - `CoreGraphics.framework`
   - `CoreImage.framework`
   - `CoreLocation.framework`
   - `CoreTelephony.framework`
   - `CoreText.framework`
   - `GLKit.framework`
   - `ImageIO.framework`
   - `libc++.tbd`
   - `libz.tbd`
   - `Metal.framework`
   - `OpenGLES.framework`
   - `QuartzCore.framework`
   - `SystemConfiguration.framework`
   - `UIKit.framework`
10. 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/journey-sharing/on-demand/ios/configure-project.md.txt)