Troubleshooting
The problems developers hit first with the Swift SDK, each with its fix.
The package's Elements trait is off, or the target is not iOS. Turn the trait on where you depend on the package:
In Xcode, turn on Elements in the package's traits under Package Dependencies. On macOS, tvOS, watchOS or visionOS, hold the map's state with MapEngine and draw it yourself.
A secret key belongs on a server, and an app build cannot name one. Mint session tokens on your server, and give the app a publishable key with a SessionTokenEngine (authentication).
The key the app read is empty: Info.plist holds $(MOUNTAYA_PUBLISHABLE_KEY) unresolved. Check that your target's configuration file includes Local.xcconfig, and that the key is set there. Log what the app read:
The Tile API refused your key, most often for a missing tiles scope. map.state.isAccessRequired turns true, and events() tells an .accessRefused with its status. Add the scope to the key under Organization → API keys in the Mountaya app.
The Data API takes a publishable key only beside a session token. Give the client a SessionTokenEngine over your server's POST /session route (authentication).
A write acts as a member. Mint its session for the studio-embedded product and name the member (act as a member).
Your organization's agreement does not cover the call, or its billing needs a payment method. It is fixed in the Mountaya app's billing settings or with Mountaya, never in code: catch .api with kind == .billing and say so.
The body was decoded and encoded again before verification. Pass constructWebhookEvent the raw bytes your web framework received, and the endpoint's own secret, whsk_ included.
DeviceLocationSource never asks for location access. Ask yourself, with a purpose string in Info.plist, and on the simulator pick a location under Features → Location:
The engine was given no voice, or the device has none for the language. Hand it a SpeechNavigationVoice with a fallbackLanguage, and give it an onError to hear a refused audio session.
SwiftPM or Xcode names the floor your target falls short of. Raise the target's deployment version to the package's floor: