![demo image](https://developers.google.com/static/maps/documentation/navigation/ios-sdk/images/try_the_demo.png)

The Navigation SDK is available as a static library. For
more information, see the [Navigation SDK reference
documentation](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes).

## Before you begin

To run the demo, you must have a Google Cloud account and an API key enabled for
the Navigation SDK by sales. Once you have a Google Cloud account, see [Set up
your development project and API key](https://developers.google.com/maps/documentation/navigation/ios-sdk/try-demo#setup).

> [!NOTE]
> **Note:** The Navigation SDK extends the [Maps SDK](https://developers.google.com/maps/documentation/ios-sdk). If your app uses the Maps SDK for its map layer, you can add the Navigation SDK to your app to enable the navigation experience. You cannot use the Navigation SDK without also having the Maps SDK installed in your app.

### Set up your development project and API key

1. **Create or open a project** in the [Google Cloud console](https://console.cloud.google.com) to use with the
   Maps SDK for iOS. Wait for a few minutes until the
   project is visible on the Cloud console.

2. **Enable Maps SDK for iOS in the Google Cloud console.**
   In the project, open the APIs section and enable the
   Maps SDK for iOS.

3. **Create an API key for the project** , by selecting **APIs \& Services \>
   Credentials \> Create credentials \> API key**.

4. Add the Maps SDK for iOS to your API key. For more
   information, see [Using API
   Keys](https://developers.google.com/maps/documentation/navigation/ios-sdk/get-api-key).

## Try the demo app

You can now download, build, and run the demo.

> [!WARNING]
> There is a known issue where apps don't compile properly for the simulator under Xcode 12. If you experience this issue, see the [Navigation SDK FAQ](https://developers.google.com/maps/documentation/navigation/ios-sdk/faq.md.txt#demoappxcode12) for steps to resolve the problem.

### Download the demo

1. Clone the code samples repository:

```bash
git clone https://github.com/googlemaps-samples/ios-navigation-sdk-samples.git
```

You can also view the [Swift navigation
demo](https://github.com/googlemaps-samples/ios-navigation-sdk-samples/tree/main/GoogleNavigation)
code on GitHub:

### Configure the demo

Follow these steps to configure your demo app.

1. Install [Xcode](https://developer.apple.com/xcode/).

2. Navigate to the GoogleNavigation repository.

   ```bash
   cd ios-navigation-sdk-samples/GoogleNavigation/
   ```
3. Open the Xcode project:

   ```bash
   open GoogleNavSwiftXCFrameworkDemos.xcodeproj
   ```
4. Add your own API key to the `SDKDemoAPIKey.swift` file. You must use the
   API key that you created in the steps in [Set up your development project
   and API key](https://developers.google.com/maps/documentation/navigation/ios-sdk/try-demo#setup).

5. Use Xcode to build and run the app.

### Troubleshooting

Show/Hide the troubleshooting information

- Choose an iOS device or simulator running iOS 17.0 or later.
- If you don't see a simulator available, add Rosetta destinations: in **Product \> Destination \> Destination Architectures** , choose **Show Rosetta
  Destinations**.
- If your build fails with **Sandbox: rsync.samba() deny** , disable User Script Sandboxing: in **Build Settings \> Build Options** , set **User
  Script Sandboxing** to **No**.