Contents

stadiamaps/stadiamaps-api-swift

This SDK helps you access the full range of geospatial APIs from Stadia Maps using Swift. Using Xcode, you'll get

Installation with Swift Package Mangager

The Xcode UI changes frequently, but you can usually add packages to your project using an option in the File menu. Then, you'll need to paste in the repository URL to search: https://github.com/stadiamaps/stadiamaps-api-swift. See https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app for the latest detailed instructions from Apple.

<a id="documentation-for-authorization"></a>

Getting Started

Authorization

You will need an API key to use the Swift SDK.

You can create an API key for free here (no credit card required).

You can configure your API key like so:

StadiaMapsAPI.customHeaders = ["Authorization": "Stadia-Auth YOUR-API-KEY"]

EU endpoints

If you want to use our EU endpoints to keep traffic within the EU, you can set the basePath property.

StadiaMapsAPI.basePath = "https://api-eu.stadiamaps.com"

Examples

You can find examples of how to call all of our API methods in the integration tests.

Documentation

Full API documentation for this SDK is available on the Swift Package Index. For broader context including tutorials, guides, and an interactive API reference, docs.stadiamaps.com.

Package Metadata

Repository: stadiamaps/stadiamaps-api-swift

Default branch: main

README: README.md