Get started
All releases
SDK
Documentation

SDKs for Swift, Kotlin, and Dart and Flutter

Three new SDKs at 0.1.0, on contract v0.9.0, beside a TypeScript SDK whose admin operations and webhook verification move to their own entry point, and docs for all four.

Added:

The Swift SDK, 0.1.0, from https://github.com/mountaya/sdk-swift with SwiftPM. Five products: MountayaClient calls the APIs, MountayaAdmin manages an organization and verifies webhooks on a server, MountayaGeo holds the renderer-free maths, MountayaNavigation follows a route with the device's location and voice, and MountayaElements draws the SwiftUI map, its controls, the elevation profile and the tables. The client runs on iOS 17, macOS 14, Mac Catalyst 17, tvOS 17, visionOS 1, watchOS 10 and Linux. The map runs on iOS, behind the package's Elements trait. See the Swift SDK.

Added:

The Kotlin SDK, 0.1.0, on Maven Central under com.mountaya. mountaya-client, mountaya-admin, mountaya-geo and mountaya-elements are Kotlin Multiplatform, for the JVM, Android and iOS. The Jetpack Compose map runs on Android, and mountaya-navigation brings device navigation to Android. Kotlin 2.4 or later, Java 17, Android API 24. See the Kotlin SDK.

Added:

The Dart and Flutter SDK, 0.1.0, on pub.dev. mountaya_client, mountaya_admin and mountaya_geo are pure Dart and run on a server too. mountaya_elements_flutter draws the map and its elements in Flutter on Android and iOS, and mountaya_navigation_flutter brings device navigation. Dart 3.10 for the pure packages, Flutter 3.44 for the plugins. See the Dart and Flutter SDK.

Added:

The four SDKs implement one contract and pass the same conformance tests: method names are the API's operation ids in every language, and retries, session tokens, errors and the map behave alike. Each SDK's API by capability lists its names beside TypeScript's: Swift, Kotlin, Dart.

Breaking:

TypeScript: the organization operations leave the client. Mountaya.admin is gone: import MountayaAdmin from @mountaya/client/admin and call new MountayaAdmin(mountaya).sessions.postSession(…), and likewise for billing, invitations, keys, members, organizations, users and webhooks. constructWebhookEvent, MountayaWebhookSignatureError and the webhook event types move to @mountaya/client/admin too, and @mountaya/client/browser exports none of them. See Manage an organization and Receive webhooks.

Breaking:

TypeScript: SearchControl highlights the place it picks on the map instead of dropping a pin, so its resultMarker prop and SEARCH_RESULT_MARKER_ID are gone. useSearch renames errored to failed and fallbackActive to fallbackNote. formatCutoffAt takes a Date on the elevation profile, the itinerary tables and the waypoint card.

Changed:

TypeScript: MapControls shows zoom, compass, layers and preferences unless you turn them off. MapView reads the elevation and the terrain of a point on a right-click or a long press (readout), and draws the Mountaya watermark, which a white-label organization drops. compactAttribution collapses the attribution. MountayaStudio mounts its video wizard itself: configure it with behavior.video.

Added:

TypeScript: the layers panel moves through time with a time slider (setInstant), @mountaya/elements/navigation follows a route (NavigationEngine, readItineraryRoute), and a header value outside printable ASCII is refused before the request leaves. Every request names its SDK in X-Mountaya-Client.

Added:

Each of the four SDKs has the same guides, from install to navigation. Switching SDK in the header keeps the page you are reading. Swift, Kotlin and Dart samples are highlighted, and the pages that teach session tokens and webhook signatures show them in every language.