# Overview

> Canonical URL: https://docs.mountaya.com/en/sdks/swift/
> Last updated: 2026-11-27
> Rules for agents: https://docs.mountaya.com/llms.txt#rules-for-agents

Native Swift packages to fetch Mountaya data, show it on a map in SwiftUI, and navigate a route, on Apple platforms and Linux.

Fetch Mountaya data, draw it on a SwiftUI map, and follow a route, from one Swift package.

## Pick your path

- [Fetch data](https://docs.mountaya.com/en/sdks/swift/quickstart-server.md): Call the Map Studio, Data and Tile APIs from a Swift server or script.
- [Show a map](https://docs.mountaya.com/en/sdks/swift/quickstart.md): A SwiftUI map with your itinerary on it, in an iPhone or iPad app.
- [Navigate a route](https://docs.mountaya.com/en/sdks/swift/navigation.md): Turn-by-turn guidance along an itinerary, spoken in your words.

## Pick your packages

The SDK is one Swift package with five products. Link only the ones you use.

| You are building | Add |
| --- | --- |
| A server, a script or an app that reads data | `MountayaClient` |
| A server that mints session tokens, runs an organization or receives webhooks | `MountayaClient` and `MountayaAdmin` |
| Distances, units, elevation profiles or search rules, with no map | `MountayaGeo` |
| Turn-by-turn navigation | `MountayaNavigation` |
| A map, its controls, search, an elevation profile or route tables in SwiftUI | `MountayaElements`, with the `Elements` trait |

[Install and set up](https://docs.mountaya.com/en/sdks/swift/install.md) has the package lines.

- The package is `https://github.com/mountaya/sdk-swift`, a public read-only mirror that SwiftPM resolves. Depend on it `from: "0.1.0"`. One tag versions all five products together.
- `MountayaClient`: the only product that calls the network. One type, `Mountaya`, with the namespaces `studio`, `agent` (Map Studio API), `data` (Data API, GraphQL) and `tiles` (Tile API). Every transport rule: credentials and session tokens, retries, idempotency keys, conditional writes, the error ladder, pagination, event streams, field selection. Runs on iOS, iPadOS, macOS, Mac Catalyst, tvOS, watchOS, visionOS and Linux.
- Every request names the SDK in `X-Mountaya-Client: mountaya-swift/0.1.0`, which no call sets. The package is written against contract `v0.9.0`, which `schemaVersion` reports (`modelDigest` names the exact files it was printed from).
- `MountayaAdmin`: the client's admin unit. `import MountayaAdmin` adds `mountaya.admin.<resource>.<operationId>` (organizations, members, invitations, keys, billing, users, webhooks, and `sessions.postSession`), `AdminSchema`, and `constructWebhookEvent`. For servers and admin tools; an app never links it.
- `MountayaGeo`: Mountaya's rules with no network and no renderer: units and formatting, geodesy, the camera, the elevation profile, road access, layers and icons, search, and navigation, which it ships whole: the `NavigationEngine` protocol and its rules, `RouteFollowingEngine` (the machine every engine stands on) and `ScriptedNavigationEngine` for tests. It links `MountayaClient` for its types and calls nothing.
- `MountayaNavigation`: `DeviceNavigationEngine`, the location sources and `SpeechNavigationVoice`. It links no third-party package and needs no trait.
- `MountayaElements`: `MapEngine` (builds everywhere) and, behind the `Elements` trait on iOS and iPadOS only, the SwiftUI `MapView` over MapLibre Native, the controls and panels, `SearchControl`, `ItineraryProfile`, the two itinerary tables, `ItinerarySparkline` and `WaypointCard`.
- Per-product platform availability: client, admin, geo and navigation build on every platform the package declares and on Linux. `.secret(key:)` and `constructWebhookEvent` exist on macOS and Linux only. `SpeechNavigationVoice` exists on iOS, iPadOS and Mac Catalyst. `MapView` and every view of `MountayaElements` exist only in an iOS build with the `Elements` trait; elsewhere the compiler refuses `MapView` with a message saying what to do.
- No studio product exists in Swift: the Embedded Studio is TypeScript only.
- Naming departures from the other SDKs: Swift spells acronyms in capitals (`APIError`, `APIErrorCode`, `BaseURLs`, `HTTPExchange`, `POIPanel`, `URI`), names a map press a tap (`MapTap`, `onTap`), and has one `MountayaError` enum with an `APIError.Kind` where the others have an exception or class per status. Operation ids and wire field names (`itinerary_id`, `expires_at`) are kept verbatim.
- The sample app Trail (an iPhone app over the four app products, never the admin unit) and its session server live under `Examples/Trail` in the SDK repository, MIT licensed.

## Requirements

| Floor | Version |
| --- | --- |
| Swift | 6.2.3 or newer |
| iOS and iPadOS | 17 or newer |
| Mac Catalyst | 17 or newer |
| macOS | 14 or newer |
| tvOS | 17 or newer |
| visionOS | 1 or newer |
| watchOS | 10 or newer |

Linux needs only that Swift. The SDK is published under the Mountaya SDK License: you may ship it inside your product while you use Mountaya's services.

- The floors are the package's `Package.swift`: `swift-tools-version: 6.2.3`, the Swift 6 language mode, platforms `.iOS(.v17)`, `.macCatalyst(.v17)`, `.macOS(.v14)`, `.tvOS(.v17)`, `.visionOS(.v1)`, `.watchOS(.v10)`. Each platform's floor is the release Observation arrived in, which every engine a view draws is observed through.
- Linux takes no floor of its own: the client, the admin unit, the geo layer and the navigation engine build wherever Swift 6.2.3 runs. The map views do not build on Linux.
- Turning the `Elements` trait on takes a tools 6.1 manifest or newer in the consumer.
- MapLibre Native is resolved only with the `Elements` trait, in the range `7.0.0..<8.0.0`, under its own BSD licence. swift-crypto (`from: "5.1.1"`) is the one other dependency.
- Licence: the Mountaya SDK License, version 1.0 (English text prevails over the French translation). Source-available, not open source: you may read the code and ship it inside your own application, in conjunction with the Mountaya services and for as long as an agreement with Mountaya is in force. The glyph sets carry Lucide icons (ISC) and Feather icons (MIT), listed in `THIRD-PARTY-NOTICES.txt`. The examples under `Examples/` are MIT licensed.
- Products: the Data API is self-serve. The Map Studio API and the Tile API come with an agreement. See [account and keys](https://docs.mountaya.com/en/account.md).

## Next steps

- [Install and set up](https://docs.mountaya.com/en/sdks/swift/install.md): The package, the `Elements` trait and your key.
- [Quickstart](https://docs.mountaya.com/en/sdks/swift/quickstart.md): A map with an itinerary in a SwiftUI app.
