Skip to main content
Version: 1.x

What v1 Covers

What every 1.x release keeps, what a 1.x release may add, and what your app should rely on.

Overview​

The Wemap SDKs follow Semantic Versioning: a patch release fixes bugs, a minor release adds features, and a change that breaks your code waits for 2.0. Semantic Versioning leaves each library to say what its API is and what counts as breaking it. This page says it for the Wemap SDKs.

What v1 covers​

The public API of WemapCoreSDK, WemapMapSDK, WemapGeoARSDK, WemapPositioningSDKVPSARKit and WemapPositioningSDKGPS, and the behavior their documentation describes.

Not covered, so any release may change it:

  • WemapMapWidgetsSDK, which ships on its own 0.x version line. Pin its exact version, see Getting Started with Wemap SDKs § Map widgets.
  • Symbols you can reach only through an @_spi import.
  • Behavior the documentation doesn't describe, and the text of log messages and error descriptions.

What a minor release may add​

None of these breaks code that follows What v1 Covers:

  • New types, members and initializer parameters with a default value.
  • A new case in a public enum, except LoadPhase and Levels, which are closed. See Getting Started with Wemap SDKs § Switching over SDK enums.
  • A new requirement in a public protocol, always with a default implementation, so your own LocationSource keeps compiling.
  • A higher minimum Xcode and Swift version. The CHANGELOG announces it. A patch release never raises it.
  • A new Info.plist key your app must declare for a feature it already uses. The CHANGELOG announces it.
  • A newer minor or patch version of MapLibre or Turf.

What stays fixed until 2.0​

Deprecations​

A renamed or replaced symbol keeps its old name, deprecated, until 2.0. The old name keeps doing what its documentation says. Xcode shows a warning on every call and, where the new symbol is a drop-in replacement, offers a fix-it. The CHANGELOG lists each deprecation in the release that makes it, under Deprecated.

Using the API as intended​

The promises above hold for code that follows these rules:

  • Switch over SDK enums with an @unknown default branch. See Getting Started with Wemap SDKs § Switching over SDK enums.
  • Don't conform your own types to SDK protocols whose documentation says "Not for conformance outside the SDK", such as NavigationManaging or PointOfInterestManaging. A minor release may add requirements to them. LocationSource is the protocol meant for your own types, see Writing a Custom Location Source.
  • Call SDK initializers and methods; don't keep them as function values, as in ids.map(Config.init(id:)), where Config stands for any SDK type, or let select = manager.select. A minor release may add a parameter with a default value to an initializer, which changes its type, or an overload of a method, which makes the reference ambiguous. Either way the reference stops compiling. Write a closure instead: ids.map { Config(id: $0) }.
  • Name what you add to SDK types so it can't clash, for example with your app's prefix: members in your own extensions of SDK types, members of your subclasses of SDK classes such as MapView, and members of your own LocationSource. A minor release may add a member with the same name and signature as yours. A subclass's member then stops compiling, because it overrides without override. A LocationSource member silently becomes the implementation of the new requirement, so the SDK calls your code in place of its default.
  • Rely only on the stream behavior the documentation describes. See Getting Started with Wemap SDKs § Observing streams.

Threading and lifecycle​

Call the SDKs from the main actor. Views, sessions, managers and location sources are @MainActor, so the compiler enforces it. You can read their streams from any task.

Wait for a view to load before using its managers. Await awaitLoaded(), or use onLoaded in SwiftUI.

  • Reading a MapView manager before the map has loaded, or a GeoARView member before configure(with:), is a programmer error, and the app stops. Fix the order of your calls.
  • A points-of-interest download failure is not one of these. The view reports it through its load phase, and its managers still work.

What fails as an error, and what crashes.

  • Errors your app handles: a network failure, no itinerary found, a map that fails to load, an offline map the SDK can't read (creating the session throws), and a configuration value out of range (the SDK clamps it).
  • Crashes from misuse: using a view's members before it has loaded.
  • The promise: nothing you can't prevent from your own code crashes your app.
  • Crash reports: the SDKs ship without debug symbols, so your crash reporter shows their frames as addresses, and an App Store upload warns that their dSYMs are missing. To have a crash symbolicated, send the full crash report (.ips or .crash) and the SDK version to the Wemap team.

One map view and one AR view per session. A second view of the same kind takes the session over from the first, and the SDK logs an error. To show two independent maps, create two sessions.

What your app must declare​

FrameworkInfo.plist key
WemapPositioningSDKVPSARKitNSCameraUsageDescription
WemapGeoARSDKNSCameraUsageDescription
WemapPositioningSDKGPSNSLocationWhenInUseUsageDescription
WemapMapSDK, when the map shows the user's location from Core Location, its defaultNSLocationWhenInUseUsageDescription

WemapCoreSDK needs no key. Your App Store privacy details are covered in Declaring App Privacy Details.

Getting help​

If the SDKs break one of these promises, that's a bug: report it to the Wemap team with the SDK version, which WemapSDKs.version returns.