Install and set up
The Swift SDK is one Swift package. You add it once and name the products each target links.
In an Xcode project, choose File → Add Package Dependencies, paste https://github.com/mountaya/sdk-swift, and pick the products for your app target.
In a package your app links, depend on it in Package.swift and list the products each library target uses:
The map's view draws with MapLibre Native, which the package links only when you turn on its Elements trait. In a manifest, that is traits: ["Elements"] above. In Xcode, select the package under Package Dependencies in the project settings and turn on Elements in its traits.
Without the trait, or on a platform other than iOS, the compiler refuses MapView and says what to turn on. An app that shows no map leaves the trait off and resolves no MapLibre.
An app carries a publishable key. Keep it out of git: put it in a Local.xcconfig that git ignores, and let the build write it into your Info.plist.
The app reads it from its bundle:
A server reads its keys from the environment instead:
Create both keys under Organization → API keys in the Mountaya app.
The secret key and the admin product are for servers. An iOS build cannot name .secret(key:) at all.