Skip to main content
Version: 1.x

Migrating to v1

Move an app from a 0.x Wemap SDK to 1.0, step by step.

Overview​

v1 replaces four things across every framework:

  • Static singletons → per-instance sessions. WemapCore.shared and WemapMap.shared are gone; a CoreSession or MapSession loads the map data and is shared by the views and location sources of one screen.
  • Global mutable constants → immutable configs. CoreConstants, MapConstants, ARConstants and the VPS constants are replaced by value-type Config structs, fixed at creation time.
  • Delegates → AsyncStream. Every *Delegate protocol on a manager or a location source is removed in favour of a read-only stream property.
  • Combine → Swift Concurrency. No public API returns an AnyPublisher any more; calls are async and/or throws.

Work through the steps in order. Each step leaves the project compiling, so you can stop and test between them. Steps 1–7 apply to every app; the rest depend on what your 0.x code uses — search your project for the symbols on the left.

If your project containsAlso read
VPSARKitLocationSource, GPSLocationSource, or any *Constants from a positioning SDK8 · positioning
PackdataManaging, downloadPackdata(mapID:)9 · offline maps
GeoARView, GeoARViewDelegate, ARConstants10 · GeoAR
your own type conforming to LocationSource11 · custom location source
a symbol that still fails to compile after 1–1112, then § "I'm getting this error"
  • Effort: a few hours for a map-only app; closer to a day for an app with VPS positioning or its own location source.
  • Toolchain: 1.0 requires Xcode 26.0 / Swift 6.2 and iOS 15.5. A later 1.x minor may raise the Xcode minimum; the current one is in Getting Started with Wemap SDKs § Requirements.
  • After 1.0: What v1 Covers says what every 1.x release keeps, and what a minor release may add.
tip

If you are migrating an Android app in parallel, the Android guide uses the same step numbering.

note

Coming from 1.0.0-beta.2? Only these changed since, and each one stops your project compiling until you apply it:

  • Step 3 — MapViewConfig and GeoARViewConfig are no longer public, and MapView, GeoARView, configure(with:) and the SwiftUI Map and GeoAR take no config: set the stale timeout and the automatic level switch on mapView.userLocationManager, and an ARNavigationStyle on arView.navigationManager.style, once the view has loaded. navigationVisibilityDistance is visibilityDistance, and the arrow's xPercentageOfView / yPercentageOfView are horizontalPosition / verticalPosition.
  • Step 3 — recalculation and projection onto the itinerary are options of each navigation: the session-wide switches are gone, so pass NavigationOptions to each startNavigation — recalculation (a RecalculationOptions, .disabled to turn it off) and projection (a ProjectionOptions, .disabled to turn it off). userPositionThreshold and navigationRecalculationTimeInterval are RecalculationOptions.indoorOffRouteDistance and minimumInterval, and isUserLocationProjectionOnGraphEnabled is SessionConfig.graphProjection.
  • Steps 3, 4, 6 and 8 — names aligned with the Android SDK: getAllPOIs() is getPOIs(); Coordinate.direction(to:) and coordinate(at:facing:) are bearing(to:) and destination(distance:bearing:); Segment.direction is bearing; Attitude.copy(…) is with(…); Step.Kind.exitRondabout is exitRoundabout; MapView.zoomWhileFollowing is zoomWhileTracking; outOfActiveLevelOpacity is outOfActiveLevelAlpha; MapProxy.visibleCoordinateBounds is visibleBounds; VPSControllerConfig.cameraImageMaxSizeSmallerSide is an Int; and VPSARKitLocationSourceError.failedToConvertUIImageToData is gone, its failure arriving as unknown(cause:).
  • NavigationError.failedToRetriveUserLocation is spelled failedToRetrieveUserLocation, and unknown(error:), which the SDK never threw, is gone.
  • Step 7 — the SwiftUI Map binds a MapCameraPosition — what the camera should do — instead of the live camera: camera(_:frequency:) and userTrackingMode(_:) give way to cameraPosition(_:), with .followUser(bearing:) in place of a tracking mode, and initialCamera(_:) to initialCameraPosition(_:). Read the camera with onCameraChange(frequency:_:). The map writes .idle into the binding when something else moves the camera, and a write inside withAnimation is animated. The widgets' itineraryForm loses its camera: parameter.
  • Step 8 — VPSARKitLocationSourceError.tiltTooHigh is gone from errors: observe scanIssue / scanIssues for .devicePointedTooLow. cameraTrackingStates emits ARCamera.TrackingState instead of ARCamera, and GeoJsonItinerary and Itinerary.toGeoJsonItinerary() are no longer public. GPSLocationSource.session and SimulatorLocationSource.session are no longer public: read coreSession.
  • Step 11 — a custom LocationSource implements startUpdating(delegate:) and stopUpdating(), reports to the LocationSourceDelegate it is given, and names its coreSession; the SDK provides coordinates, attitudes, errors and isStarted.
  • Step 12 — the models are created only by the SDK and are no longer Codable; PointOfInterest.externalData is a JSON String?; PointOfInterestType, Incline, Step.Direction and TravelMode.Preference are no longer RawRepresentable; the Bundle helpers and the members the SDK added to Apple, MapLibre and Turf types are gone; MapView is no longer an MLNMapViewDelegate; GPSLocationSource is no longer an NSObject; Segment and LegSegment are structs with read-only properties; and CoordinateSpan, the Float3, MatD4x4 and QuaternionF typealiases, Logger.logInit, logDeinit and logFun, and the GeoAR ShaderTypes.h symbols are no longer public.

Some behaviour changed since 1.0.0-beta.2 too, with nothing for the compiler to catch: check the rows of Changes that compile but behave differently below.

Coming from 1.0.0-beta.1? First apply the breaking changes of 1.0.0-beta.2, then the list above.

1 · Update the dependency​

Rule: move to the latest 1.x release through Swift Package Manager, and raise your toolchain floor.

Take the version itself — and the transitive dependency versions that come with it — from the releases page. This guide deliberately does not repeat them, so that it stays correct as 1.x moves on.

Two floors changed in v1, and they block the build before anything else does:

  • Xcode 26.0 / Swift 6.2, as of 1.0; the current minimum is in Getting Started with Wemap SDKs § Requirements. The SDKs ship as binary XCFrameworks, which only the toolchain that built them and newer can consume. SPM refuses the package outright on an older Xcode.
  • iOS 15.5 deployment target, raised from 13.0.

The Map SDK's public API now exposes MapLibre 7.x types, so a pinned older MapLibre will not satisfy it.

CocoaPods is no longer supported. v1 ships through Swift Package Manager only; 1.0.0-beta.1 is the last release published as pods, and existing Podfiles pinned to a 0.x or 1.0.0-beta.1 version keep resolving. To move:

  1. Remove the Wemap pods from your Podfile and run pod install. If they were the only pods, run pod deintegrate instead and open the .xcodeproj from then on.
  2. Add https://github.com/wemap/wemap-sdk-ios-distribution as described in Getting Started with Wemap SDKs § Installation, and link each product your app used:
PodSwift package product
WemapCoreSDKWemapCoreSDK
WemapMapSDKWemapMapSDK
WemapGeoARSDKWemapGeoARSDK
WemapPositioningSDK/VPSARKitWemapPositioningSDKVPSARKit
WemapPositioningSDK/GPSWemapPositioningSDKGPS

The module names are unchanged, so no import needs editing. MapLibre and Turf come with the package; drop any pod you listed only to pin them.

2 · Create a session​

Rule: wherever you reached a singleton or passed a MapData, create one session per screen and pass it in.

// before
WemapMap.shared.getMapData(mapID: 19158, token: "TOKEN")
.sink(receiveCompletion: { _ in }) { mapData in
let mapView = MapView(frame: view.bounds)
mapView.mapData = mapData
}
.store(in: &cancellables)

// after
let session = try await MapSession(mapID: 19158, token: "TOKEN", config: SessionConfig(environment: .prod))
let mapView = MapView(frame: view.bounds, session: session)

Share the same session across a screen's MapView, GeoARView and location sources — that is what keeps navigation, POI selection and user location consistent. A second map needs its own session.

CoreSession(mapID:token:config:) and MapSession(mapID:token:config:) are both async throws; offline maps use MapSession(offlineZip:config:) (see step 9).

Removed: WemapCore.shared, WemapCore.setEnvironment, WemapCore.setItinerariesEnvironment, WemapMap.shared, WemapMap.getMapData(mapID:token:), ServiceFactory, DependencyManager.

Initializer mapping:

v0.xv1.0
MapView(frame:) + mapDataMapView(frame:session:)
GeoARView(frame:options:) + mapDataGeoARView(frame:session:)
VPSARKitLocationSource(mapData:) / (serviceURL:)try VPSARKitLocationSource(session:config:)
GPSLocationSource(mapData:)GPSLocationSource(session:)
SimulatorLocationSource(mapData:options:) / (options:)SimulatorLocationSource(session:options:)
Interface BuildermapView.configure(with:) / geoARView.configure(with:)

Watch out: MapData is no longer public. Read map metadata from the session — session.mapID, session.mapCenter, session.isVPSEnabled. MapView.mapData and GeoARView.mapData are gone, and MapServicing with them — the session resolves map metadata itself.

3 · Pass configs instead of setting globals​

Rule: every value you used to assign to a *Constants static is now a let property of a config struct, built in one initializer call and passed at creation time — except the user-location values, which are properties of the UserLocationManager that applies them. There is no global mutable configuration left.

// before
CoreConstants.itineraryRecalculationEnabled = false
MapConstants.staleStateTimeout = 10 // TimeInterval

// after
let session = try await MapSession(
mapID: 19158, token: "TOKEN",
config: SessionConfig(environment: .dev)
)
let mapView = MapView(frame: view.bounds, session: session)
// once the map has loaded
mapView.userLocationManager.staleStateTimeout = .seconds(10)
// recalculation is an option of each navigation, not of the session
try await mapView.navigationManager.startNavigation(
destination: destination, options: NavigationOptions(recalculation: .disabled)
)
v0.xv1.0Passed to
CoreConstants staticsSessionConfigCoreSession.init / MapSession.init
CoreConstants recalculation and itinerary-projection staticsNavigationOptionseach startNavigation call
WemapCore.setEnvironment(_:)SessionConfig.environmentCoreSession.init / MapSession.init
WemapCore.setItinerariesEnvironment(_:)SessionConfig.directionsEnvironmentCoreSession.init / MapSession.init
MapConstants staticsUserLocationManager propertiesmapView.userLocationManager, once the map has loaded
ARConstants + ARConstants.DirectionalArrowARNavigationStyle + ARNavigationStyle.DirectionalArrowarView.navigationManager.style, once the AR view has loaded
VPSARKitConstants, VPSControllerConstants, StateManagerConstantsVPSConfig — see step 8VPSARKitLocationSource.init

Renames and shape changes to expect while you move the values across:

  • UserLocationManager.staleStateTimeout is a DispatchTimeInterval, not a TimeInterval.
  • ARNavigationStyle.stepInstructionAltitude fixes the old stepInstuctionAltitude spelling, and navigationVisibilityDistance is now visibilityDistance, optional.
  • The directional arrow's xPercentageOfView / yPercentageOfView are horizontalPosition / verticalPosition: they hold fractions of the view, 0 to 1, not percentages.
  • MapView.zoomWhileFollowing is zoomWhileTracking, and UserLocationViewStyles.outOfActiveLevelOpacity is outOfActiveLevelAlpha, like accuracyAlpha and pulseAlpha beside it.
  • VPSControllerConfig.cameraImageMaxSizeSmallerSide is an Int number of pixels, not a CGFloat.
  • MapConstants keeps only wemapBlue; ARConstants is no longer public at all.
  • Environment lost domain and name.
  • CoreConstants.itinerariesHost / itinerariesBaseURL were stored and settable; the SessionConfig properties that replace them are computed from directionsEnvironment, so they can no longer disagree with it.
  • Every Bool reads as a statement about what owns it — is…, or a verb such as uses… — including the ones 1.0.0-beta.1 shipped under their 0.x names:
0.x and 1.0.0-beta.1v1.0
itineraryRecalculationEnabledNavigationOptions.recalculation.isEnabled — moved, see below
userLocationProjectionOnItineraryEnabledNavigationOptions.projection — moved, see below
userLocationProjectionOnGraphEnabledSessionConfig.graphProjection — see below
switchLevelsAutomaticallyOnUserMovementsUserLocationManager.switchesLevelsAutomatically — moved, see below
pulseEnabledUserLocationViewStyles.isPulseEnabled
visualDebuggingEnabledno longer public
useGrayscaleImageForVPS, useJPGImageForVPSVPSControllerConfig.usesGrayscaleImageForVPS, usesJPGImageForVPS
NavigationOptions.stopWhenArrivedAtDestinationstopsWhenArrivedAtDestination
SimulationOptions.inLoop, restartDelay, simulateAttituderepeats, repeatDelay, simulatesAttitude
UseTags.active, clickableisActive, isClickable
UserLocalizationUpdate.backgroundScanisFromBackgroundScan

Recalculation and projection onto the itinerary are options of each navigation, not of the session, so one session can run a navigation that keeps a hand-built itinerary next to one that reroutes. 1.0.0-beta.2's SessionConfig.isItineraryRecalculationEnabled and isUserLocationProjectionOnItineraryEnabled are gone; pass NavigationOptions to each startNavigation instead. The three recalculation values are grouped in RecalculationOptions:

1.0.0-beta.2v1.0
SessionConfig.isItineraryRecalculationEnabledNavigationOptions.recalculation — .disabled turns it off
SessionConfig.isUserLocationProjectionOnItineraryEnabledNavigationOptions.projection — .disabled turns it off
SessionConfig.isUserLocationProjectionOnGraphEnabledSessionConfig.graphProjection — ProjectionOptions() turns it on
NavigationOptions.userPositionThresholdRecalculationOptions.indoorOffRouteDistance — outdoorOffRouteDistance is new
NavigationOptions.navigationRecalculationTimeIntervalRecalculationOptions.minimumInterval
try await mapView.navigationManager.startNavigation(
destination: destination,
options: NavigationOptions(
projection: .disabled,
recalculation: RecalculationOptions(indoorOffRouteDistance: 20, minimumInterval: 10)
)
)

The user's location is projected only within a maximum distance of the route, 15 meters indoors and 50 outdoors by default: indoorMaxDistance and outdoorMaxDistance. 1.0.0-beta.2 projected it however far the user was, so a user who left the route stayed drawn on it. Now the user indicator leaves the route beyond that distance, a location the itinerary does not project is tried on the graph when SessionConfig.graphProjection is enabled, and the navigation info counts the distance between the user and the itinerary. To keep a user on the route however far they are, set both distances to .infinity.

Watch out: every config property is let. Build the config you want in one init call — there is nothing to assign to afterwards, by design.

The user-location settings are properties of UserLocationManager, not of a config, so they can follow a location source swapped at runtime — a source that delivers in bursts needs a longer stale timeout than GPS. A new value takes effect at the next fix. MapViewConfig is no longer public API, and MapView, configure and the SwiftUI Map lose their config parameter; set the two values on mapView.userLocationManager once the map has loaded — from onLoaded(_:) in SwiftUI:

1.0.0-beta.2v1.0
MapViewConfig.switchesLevelsAutomaticallyOnUserMovementsUserLocationManager.switchesLevelsAutomatically
MapViewConfig.staleStateTimeoutUserLocationManager.staleStateTimeout — out-of-range values are clamped when set
MapView(frame:session:config:)MapView(frame:session:)
mapView.configure(with:config:)mapView.configure(with:)
Map(session:config:makeMapView:)Map(session:makeMapView:), whose makeMapView takes no config
Map(session: session)
.onLoaded { mapView in
mapView.userLocationManager.staleStateTimeout = .seconds(10)
mapView.userLocationManager.switchesLevelsAutomatically = false
}

How the AR view draws a navigation is style, an ARNavigationStyle set on the AR view's navigation manager rather than a config: it can be set again at any time — to move the directional arrow clear of a bottom sheet, for instance — and a new style applies to the navigation already shown. It stays per AR view, not per navigation, because a navigation started from the map is drawn by the AR view too. GeoARViewConfig is no longer public API, and GeoARView, configure and the SwiftUI GeoAR lose their config parameter; set the style on arView.navigationManager once the view has loaded — from onLoaded(_:) in SwiftUI:

1.0.0-beta.2v1.0
GeoARViewConfigARNavigationStyle — out-of-range values are clamped when set
GeoARViewConfig.navigationVisibilityDistanceARNavigationStyle.visibilityDistance
GeoARViewConfig.DirectionalArrow.xPercentageOfView / yPercentageOfViewARNavigationStyle.DirectionalArrow.horizontalPosition / verticalPosition
GeoARView(frame:session:config:)GeoARView(frame:session:)
arView.configure(with:config:)arView.configure(with:)
GeoAR(session:config:makeARView:)GeoAR(session:makeARView:), whose makeARView takes no config
GeoAR(session: session)
.onLoaded { arView in
arView.navigationManager.style = ARNavigationStyle(
directionalArrow: .init(verticalPosition: 0.7)
)
}

4 · Update your Coordinate and level usage​

Rule: Coordinate is an immutable struct built around CLLocationCoordinate2D — it no longer wraps a CLLocation — and levels are a Levels value rather than [Float].

// before
let coordinate = Coordinate(location: someCLLocation, levels: [0, 1])
let heading = coordinate.direction
let location = coordinate.location

// after
let coordinate = Coordinate(coordinate2D: someCLLocation.coordinate, levels: .range(0...1))
let heading = coordinate.bearing
let location = coordinate.toLocation()
v0.xv1.0
levels: [Float] (empty meant outdoor)levels: Levels (.outdoor by default)
Coordinate(location:levels:heightFromFloor:heightFromGround:)Coordinate(coordinate2D:levels:altitude:bearing:horizontalAccuracy:timestamp:heightFromFloor:heightFromGround:)
directionbearing
direction(to:)bearing(to:)
coordinate(at:facing:)destination(distance:bearing:)
location: CLLocationtoLocation()
Segment.directionSegment.bearing
Attitude.copy(quaternion:time:accuracy:)Attitude.with(quaternion:time:accuracy:)
ShortStringConvertible / shortDescriptionCustomCompactStringConvertible / compactDescription

Levels has .outdoor, .single(_:) and .range(_:) (a ClosedRange<Float>), plus init(array:), union, contains, intersects, intersection and diff. Segment.levels is a Levels too.

horizontalAccuracy is a stored CLLocationAccuracy and timestamp a stored Date.

Removed: cartesian, ecef, ecefToEnuRot, enuToEcefRot, ecefToEusRot, eusToEcefRot and the copy(…) overloads.

compactDescription replaces shortDescription on Coordinate, Itinerary, ItinerarySearchRules, NavigationInfo, NavigationOptions, PointOfInterest, PointOfInterestType, TravelMode, ItineraryOptions and LineOptions.

Level moved from Core to the Map SDK and is a struct instead of an @objc final class; LevelData and LevelUtils went with it. Import WemapMapSDK where you used to get Level from Core.

Watch out: toLocation() allocates a fresh CLLocation on every call — hold the result rather than calling it in a loop.

5 · Replace delegates with AsyncStream​

Rule: delete the delegate conformance and consume the stream of the same name in a Task.

// before
mapView.pointOfInterestManager.delegate = self
func pointOfInterestManager(_ manager: PointOfInterestManager, didSelectPointOfInterest poi: PointOfInterest) { … }

// after — take the stream out of the manager *before* the task, so the task captures the stream, not the manager
let selectionUpdates = mapView.pointOfInterestManager.selectionUpdates
observationTasks = [
Task { [weak self] in
for await update in selectionUpdates {
guard let self else {
return
}
handle(update)
}
}
]
v0.x delegatev1.0 streams
LocationSourceDelegatea class the SDK hands to startUpdating(delegate:) — see step 11; read coordinates / attitudes / errors
NavigationManagerDelegatenavigationEvents (NavigationEvent) / navigationInfoUpdates / errors
PointOfInterestManagerDelegateselectionUpdates (PointOfInterestSelectionUpdate) / touchedPOIs
BuildingManagerDelegatefocusedBuildings / activeLevelChanges / errors
UserLocationManagerDelegate, ARLocationManagerDelegatecoordinates / attitudes / errors
MapViewDelegatesee step 7
VPSARKitLocationSourceDelegatesee step 8

Also removed: the publishers bridges — MapView.publishers, VPSARKitLocationSource.publishers, MapViewDelegatePublishers, VPSARKitLocationSourceDelegatePublishers. coordinatePublisher is coordinates.

UserLocationManager and ARLocationManager now conform to the read-only UserLocationProviding, renamed from LocationProviding.

Watch out: never write for await x in mapView.someManager.someStream. That captures the manager — and through it the view — for as long as the task runs, so the owner's deinit never runs, and deinit is what cancels the task: the leak keeps itself alive. Extract the stream into a local first, capture [weak self], and return — not continue — once self is gone. Hold the tasks (observationTasks above) and cancel them on teardown.

6 · Await instead of subscribing​

Rule: an AnyPublisher-returning call is now async and/or throws and returns its value directly.

// before
mapView.navigationManager.startNavigation(to: destination)
.sink(receiveCompletion: { … }, receiveValue: { navigation in … })
.store(in: &cancellables)

// after
let navigation = try await mapView.navigationManager.startNavigation(to: destination)

Calls that changed shape: ItineraryProviding.itineraries(…), ruleNames(), itinerariesInfoToMultipleDestinations(…), PointOfInterestServicing.pointsOfInterest(…), PointOfInterestManaging.sortPOIsByGraphDistance(…) / sortPOIsByDuration(…), ItineraryManager.searchRuleNames(), MapNavigationManaging.startNavigation(…), ARNavigationManaging.startNavigation(…), VPSARKitLocationSource.isVPSAvailable(at:) and distanceToVPSCoverage(from:).

Removed with Combine: Signal, EventPublisher, PassthroughRelay, CurrentValueRelay, Just.any(_:), Empty.any(…), Empty.never(), Fail.any(…).

Renames and signature changes on the same call sites:

v0.xv1.0
ItineraryService, ItineraryServiceErrorDirectionsService, DirectionsServiceError (gained graphUnavailable and requestFailed(code:reason:); noItinerariesFound gained reason)
ItineraryServicingrenamed DirectionsServicing and no longer public
ItineraryProviding.graph(id:), ruleNames(graphId:)graph(), ruleNames()
itineraries(…mapId:)itineraries(…) — no mapId
itinerariesInfoToMultipleDestinations(origin:pois:mapID:)(origin:destinations:travelMode:searchRules:), taking [Coordinate] and returning [CoordinateWithItineraryInfo] — the POI-based call is now itinerariesInfoToMultiplePOIs(origin:pois:…)
PointOfInterestServicing.pointsOfInterestList(mapID:limit:)pointsOfInterest(limit:)
PointOfInterestWithInfo (typealias)PointOfInterestWithItineraryInfo
PointOfInterestManager.SelectionModePointOfInterestSelectionMode
PointOfInterestManaging.filterByTag(_:), filterByTags(_:matchMode:), TagMatchModetagFilter = .tag(_:), .any(of:) / .all(of:)
PointOfInterestManaging.removeFilters()tagFilter = nil
ItineraryManager.itineraries, getItineraries(…)drawnItineraries, computeItineraries(…)
ItineraryManager.searchRuleNames(graphId:)searchRuleNames()
NavigationManaging.infoUpdatesTimeIntervalnavigationInfoUpdatesInterval
MapView.map (WemapMap)removed with the type
Building.isEqual(_:) / hashHashable / hashValue; levels is read-only
Logger.d/i/v/e/fsame, plus a privacy parameter; Logger.category is read-only

ItineraryManager.addItinerary(_:options:) returns Bool instead of (inserted:memberAfterInsert:), and removeItinerary(_:) returns Bool instead of Itinerary?. startNavigation overloads take an additional userTrackingMode, and their itineraryOptions parameter is optional — nil preserves the current options. MapPointOfInterestManaging.selectPOI(…) and centerToPOI(…) take an optional zoom; without one, the map zooms in to 18 only when it is further out, where it used to set 18 either way, and a tap on a POI keeps the zoom.

Watch out: the old filters added up — filterByTag("a") then filterByTag("b") kept the POIs carrying both — while setting tagFilter replaces the filter in place. Combine tags in one PointOfInterestTagFilter, nesting .all and .any as needed. It also applies to POIs added after it was set, which the old filters did not.

Watch out: the SDK builds in Swift 6 language mode. The view and manager surfaces are @MainActor without @preconcurrency, so a call from a non-isolated context no longer compiles implicitly — hop to the main actor explicitly. LocationSource, UserLocationProviding, ItineraryProviding and PointOfInterestServicing gained a Sendable requirement (see step 11).

7 · Views: LoadPhase and non-optional managers​

Rule: wait for the view with awaitLoaded() (or observe loadPhases), then use its managers without optional handling.

// before
mapView.mapDelegate = self
func mapViewLoaded(_ mapView: MapView, style: MLNStyle, data: MapData) {
mapView.navigationManager?.startNavigation(…)
}

// after
try await mapView.awaitLoaded()
mapView.navigationManager.startNavigation(…) // no optional, no `if let`

MapViewDelegate is removed. MapView reports loading through loadPhase / loadPhases (LoadPhase) and awaitLoaded(), and taps that selected no POI through touchedPoints. MapView.isLoaded and MapView.mapDelegate are gone with it. mapViewLoaded(_:style:data:) has no replacement payload: MapData is no longer public, and MapView.style is non-nil from .ready onward.

Every late-initialized member of both views is a plain non-optional property, and misuse is reported with a diagnostic naming the property instead of "Unexpectedly found nil while unwrapping an Optional value":

  • MapView: session, config, pointOfInterestManager, navigationManager, buildingManager, itineraryManager, userLocationManager
  • GeoARView: session, config, pointOfInterestManager, navigationManager, locationManager

map.navigationManager.startNavigation(…) is unaffected, but if let manager = map.navigationManager and map.navigationManager?.… no longer compile — drop the optional handling and gate the access on awaitLoaded() or loadPhases instead.

Failures are now reported. A map that fails to load settles .failed; in v0.x it logged mapViewDidFailLoadingMap, told nobody, and left awaitLoaded() suspended forever. A points-of-interest download failure settles .failed as well, and in that case every manager stays usable, exactly as before.

MapView.initialCamera sets the camera the map opens at, in place of the one derived from the map data. It is handed over rather than applied — the camera needs a laid-out view — so set it before the view is laid out; a later assignment is ignored and logged. MapView.isInitialCameraApplied / awaitInitialCamera() report when it has been applied; it is not part of LoadPhase.

Watch out: isLoaded was true after a failure too, so its closest equivalent is !loadPhase.isLoading — not loadPhase.isReady.

Watch out: one view of each kind per session. A session holds one map renderer and one AR renderer slot, so a second MapView on the same session evicts the first, which keeps drawing while no manager drives it.

SwiftUI Map: bind what the camera should do. Map binds a MapCameraPosition with cameraPosition(_:) — .followUser(bearing:), .camera(_:), .fit(_:insets:) and the rest — in place of camera(_:frequency:) and userTrackingMode(_:), and initialCamera(_:) is initialCameraPosition(_:). Read the live camera with onCameraChange(frequency:_:). The map writes .idle into the binding when something else moves the camera, and a write inside withAnimation is animated. The widgets' itineraryForm no longer takes a camera: parameter.

8 · If you use positioning (VPS or GPS)​

Rule: construct the source with the session and a VPSConfig, and consume its streams instead of a delegate.

// before
VPSControllerConstants.backgroundScanDistanceThreshold = 20
let source = VPSARKitLocationSource(mapData: mapData)
source.vpsDelegate = self

// after
let source = try VPSARKitLocationSource(
session: session,
config: VPSConfig(controller: VPSControllerConfig(backgroundScanDistanceThreshold: 20))
)
let states = source.states // out of the source before the task, as in step 5
observationTask = Task { [weak self] in
for await state in states {
guard let self else {
return
}
handle(state)
}
}

VPSARKitLocationSource.init(session:config:) throws. VPSConfig composes VPSLocationSourceConfig, VPSControllerConfig, VPSStateManagerConfig, VPSStaticPositionDetectorConfig and VPSConveyingDetectorConfig — under the labels locationSource:, controller:, stateManager:, staticPositionDetector: and conveyingDetector: — replacing VPSARKitConstants, VPSControllerConstants and StateManagerConstants.

VPSARKitLocationSourceDelegate is removed in favour of states, scanStatuses, backgroundScanStatuses, cameraTrackingStates, userLocalizationUpdates and errors. delegate, vpsDelegate, attitudeDelegate, captureDelegate, observer and delegateQueue are gone with it. cameraTrackingStates emits ARKit's ARCamera.TrackingState, with its limitation reason, rather than the whole ARCamera.

Other changes:

v0.xv1.0
VPSARKitLocationSourceError.failedToConvertUIImageToPNGDataremoved: the failure arrives as unknown(cause:) (and there is a new noVPSEndpoint case)
VPSARKitLocationSourceObserver, willSendImageremoved
VPSARKitLocationSourceError.tiltTooHighnot an error any more: scanIssues is .devicePointedTooLow while a scan points too low
VPSARKitLocationSourceError seen as an NSError (Objective-C, Flutter)failedToCalculateDistanceToVPSCoverage is code 7 instead of 8, and cameraAccessDenied code 8 instead of 9; the other codes are unchanged
DegradedPositioningReason.vpsTrackingInterruptedremoved
TrackingState / WorldMappingStatus / DegradedPositioningReason.Reason / UIDeviceOrientation helpers description / isStable / isTrackingremoved
GPSLocationSource(mapData:)GPSLocationSource(session:); isAvailable is read-only
GPSLocationSource.session, SimulatorLocationSource.sessioncoreSession, from LocationSource

VPSARKitLocationSource no longer conforms to AttitudeSource, CameraCaptureProviding, ConveyingDetecting or NavigationManagerInterceptor, and attitudeAccuracy / buffersPublisher were removed. GeoJsonItinerary is no longer public: give the location source an itinerary from your own map with Itinerary(origin:destination:segments:transitMode:).

9 · If you use offline maps​

Rule: get a packdata service from the session, then open the downloaded package as a session.

// before
let manager: PackdataManaging = …
manager.downloadPackdata(mapID: 19158)
.flatMap { manager.loadMapData(fromZip: $0.fileURL) }
.sink { mapData in … }
.store(in: &cancellables)

// after
let service = MapSession.createPackdataService(mapID: 19158, environment: .prod)
let packdata = try await service.downloadPackdata()
let session = try await MapSession(offlineZip: packdata.fileURL)
v0.xv1.0
PackdataManagingPackdataServicing, from MapSession.createPackdataService(mapID:environment:)
downloadPackdata(mapID:), isNewPackdataAvailable(mapID:eTag:)downloadPackdata(), isNewPackdataAvailable(eTag:) — mapID is bound at construction
loadMapData(fromZip:)MapSession(offlineZip:config:)

Packdata still carries fileURL, eTag, version and fileName. It is no longer Codable: to remember a download between launches, store the values you need in a type of your own.

10 · If you use GeoAR​

Rule: same as the map — session in, loadPhase out, and the navigation look set on the navigation manager.

GeoARViewDelegate is removed, together with GeoARView.isLoaded and GeoARView.viewDelegate. GeoARView reports loading through loadPhase / loadPhases (LoadPhase) and awaitLoaded(), the same surface as MapView — so geoARViewLoaded(_:mapData:) has no replacement callback at all.

ARConstants and ARConstants.DirectionalArrow became ARNavigationStyle and ARNavigationStyle.DirectionalArrow — see step 3. ARPointOfInterestManaging.isFixedSize moved off PointOfInterestManager onto the protocol. UIInterfaceOrientation.description was removed.

Custom POIs are added through the AR view only. addPOI(_:), addPOIs(_:), removePOI(_:) and removePOIs(_:) left PointOfInterestManaging for ARPointOfInterestManaging, so mapView.pointOfInterestManager.addPOI(poi) no longer compiles. It never drew anything on the map while returning true; call it on arView.pointOfInterestManager instead. The map will gain them back once it draws custom POIs.

SceneKit is no longer part of the AR view's API. GeoARView is a UIView instead of an SCNView, and GeoARView.camera, .geoScene and .rootNode are gone with GeoCamera, GeoEntity and GeoNode — the scene graph is now an implementation detail, so a future renderer change costs you nothing. The options parameter went with them: GeoARView(frame:session:), GeoAR(session:makeARView:) and the makeARView closure take no [String: Any]. Nothing replaces the removed members; if you were reading the scene graph, tell us what for.

Watch out: on the Interface Builder path configure(with:) only runs once — a second call is ignored. The navigation style is set on navigationManager afterwards, once the view has loaded.

11 · If you implement a custom LocationSource​

Rule: keep conforming to LocationSource, through two methods the SDK calls: startUpdating(delegate:) and stopUpdating(). Report through the LocationSourceDelegate the SDK hands to startUpdating, instead of a delegate property it sets. The app keeps calling start() and stop(), which the SDK now owns. The full guide is Writing a Custom Location Source.

// before
final class MyLocationSource: LocationSource {
static let isAvailable = true
weak var delegate: LocationSourceDelegate?
let supportsHeading = true
private(set) var isStarted = false
func report(_ c: Coordinate) { delegate?.locationSource(self, didUpdateCoordinate: c) }
func start() { …; isStarted = true }
func stop() { …; isStarted = false }
}

// after
final class MyLocationSource: LocationSource {
let coreSession: CoreSession
private var delegate: LocationSourceDelegate?
let supportsAttitude = true
init(session: CoreSession) { coreSession = session }
func report(_ c: Coordinate) { delegate?.didUpdate(coordinate: c) }
func startUpdating(delegate: LocationSourceDelegate) { self.delegate = delegate; … }
func stopUpdating() { delegate = nil; … }
}

mapView.userLocationManager.locationSource = MyLocationSource(session: session) // unchanged
v0.xv1.0
LocationSource.delegate (LocationSourceDelegate protocol), set by the SDKthe delegate passed to startUpdating(delegate:), a LocationSourceDelegate the SDK creates
start()implement startUpdating(delegate:); call start()
stop()implement stopUpdating(); call stop()
delegate?.locationSource(self, didUpdateCoordinate:) / didUpdateAttitude: / didFailWithError:delegate?.didUpdate(coordinate:) / didUpdate(attitude:) / didFail(with:)
isStartedkept by the SDK; nothing to implement
static var isAvailablenot part of the protocol any more: remove it, or keep it as your type's own check
—coreSession, the session the source reports to
LocationSource.supportsHeadingsupportsAttitude, false by default
SimulationOptions.simulateHeadingsimulatesAttitude
  • A coordinate you report is processed like the SDK's own sources': projected on the navigation's itinerary, or on the map's graph, when projection is enabled.
  • coordinates, attitudes and errors are the session's streams on every source, yours included, and the SDK provides them: remove your own.
  • The SDK starts and stops the source as its views need it, and hands every start a new delegate. The previous one stops forwarding, as does the delegate of a source that was stopped, by the SDK or by your stop(), replaced or deallocated, so a provider callback that arrives late is dropped. The delegate can be called from any thread.
  • Report attitudes only when supportsAttitude is true: otherwise the SDK reports the device sensors' own, and the two would interleave.

The assignment point is unchanged: mapView.userLocationManager.locationSource for the map, and geoARView.locationManager.locationSource for AR.

LocationSource is @MainActor and refines AnyObject, Sendable, so the conformance carries Sendable for you — but the type has to actually satisfy it. UserLocationProviding, ItineraryProviding and PointOfInterestServicing gained the same requirement.

Watch out: rename your start() and stop(), don't keep them beside the hooks. Called on your concrete type, a start() of your own hides the SDK's, so the SDK never hands the source a delegate and never sees the stop. Drive a source with start() and stop(), never by calling startUpdating or stopUpdating yourself.

Watch out: a source your app starts stays your app's to stop. The SDK reference-counts its own start and stop requests, so a view disabling its location component no longer stops a source it did not start.

The SDK's manager, service and provider protocols are not for conformance. They may gain requirements in a minor release, which would break a conformance outside the SDK. Calling them is fine.

12 · Symbols that are no longer public API​

Rule: these were public in 0.x and are not part of the supported surface any more. There is no customer-facing replacement for any of them — if your app uses one, plan the migration off it.

Some exist only for cross-module needs inside the SDK now. They are excluded from this documentation, and reaching one fails to compile with "is inaccessible due to '@_spi' protection level":

MapData, CoreConstants, DataStore, Graph with Vertex / Edge, LocationProcessor, NavigationManager, PointOfInterestManager, ItineraryProvider, ServiceBase / RemoteServiceBase / LocalServiceBase, FileServicing, AttitudeSource with SystemAttitudeSource, ConveyingDetecting with ConveyingBuffer, NavigationRendering, PointOfInterestRendering, NavigationManagerInterceptor, CameraCaptureDelegate / CameraCaptureProviding with ViewParameters, InstructionKey, Inclination, Status, HTTPMethod / HTTPHeaders / HTTPHeader / URLRequestConvertible, Attribute, Validator, Math, GeoUtils, GeoConstants, JSONBodyEncoder / QueryEncoder, Zip with ZipError, VisualDebugger, MapPointOfInterestManaging.defaultZoom, Coordinate.equals(…), ARConstants, LocalPose with MatF4x4, and the GeoARView camera-provider members.

Created only by the SDK now: you still receive these, but can no longer build them yourself — Itinerary (except from segments, below), Leg, Destination, CoordinateWithItineraryInfo, PointOfInterestWithItineraryInfo, Packdata, Segment, LegSegment (build segments with LegSegment.fromCoordinates(…)), Heading and Step.Direction(fromAngle:). Calling one of their initializers fails with "is inaccessible due to 'internal' protection level". To give VPSARKitLocationSource an itinerary from your own map, create it with Itinerary(origin:destination:segments:transitMode:).

Not Codable any more: Itinerary, Leg, Step, Destination, ItineraryInfo, PointOfInterest with ExtraMedia, PaginationContainer, Category, Tag, UseTags, Coordinate, Attitude, TravelMode with Preference, Step.Kind, Step.Direction, Incline, PointOfInterestType, ItinerarySearchRules, Level and Packdata. The SDK decodes them itself; the backend's JSON is not part of the API. CLLocationCoordinate2D, simd_quatd and simd_float3x3 no longer get a Codable conformance from the SDK either, so an app that needs one declares its own. To persist one of these models, store the values you need in a type of your own. PointOfInterest.externalData carries the POI's free-form metadata as the raw JSON String? instead of a Turf JSONValue: decode it with the JSON library of your choice.

No more Bundle helpers: Bundle.core, .map, .mapLibre, .geoAR and .positioningVPSARKit are gone, and so are the version, build, name and displayName properties the SDK added to every Bundle — including Bundle.main. Read the SDKs' version from version; it carries the pre-release suffix and is right however the SDKs are linked. An app that read its own version through Bundle.main.version reads CFBundleShortVersionString itself.

No more helpers on Apple, MapLibre and Turf types. The SDK no longer adds members or conformances to types it does not own, so an app that used one declares its own: CLLocationCoordinate2D's Hashable conformance, MLNCoordinateBounds's Equatable and Hashable conformances and span, MLNUserTrackingMode's isFollowing, UIInterfaceOrientation's description, CLLocation's init(ecef:), init(cartesian:), init(coordinate2D:…), copy(…), hasAltitude and hasDirection, BoundingBox.center and toCoordinateBounds(), and the vector and quaternion math on Double3 and Quaternion (identity, rotateX(angle:), toQuaternionF()…). The Float3, MatD4x4 and QuaternionF typealiases are gone too; Double3 and Quaternion stay, since Attitude uses them. Logger.logInit(_:_:), logDeinit(_:_:) and logFun(_:params:) are no longer public either.

MapView and GPSLocationSource are no longer delegates. MapView does not conform to MLNMapViewDelegate any more, so a subclass cannot override mapView(_:didFinishLoading:), mapView(_:regionDidChangeWith:animated:) and the other three; set mapLibreDelegate instead, or observe loadPhases and the camera. GPSLocationSource does not conform to CLLocationManagerDelegate, it is final, and it is no longer an NSObject, so it is not Equatable or Hashable either: compare two sources with ===.

Server-decoded enums are no longer RawRepresentable. PointOfInterestType, Incline, Step.Direction and TravelMode.Preference keep init(rawValue:), but it is non-failable: a value the SDK does not know becomes .unknown instead of nil. Drop the if let or guard let around the call, and test for .unknown where you handled nil. Code that relied on the RawRepresentable conformance itself, such as a generic over it, reads rawValue directly.

Segment and LegSegment are structs. A LegSegment is no longer a Segment: read its distance, levels, coordinates and bearing (0.x's direction) from legSegment.segment, and pass legSegment.segment where a Segment is expected.

Removed outright, with no replacement: toDispatchTimeInterval(), toUnix(), allPerform(_:), filterPolygons(), filterMultiPolygons(), localize(args:locale:comment:), Polygon.distance(to:), MultiPolygon.distance(to:), Polygon.init(center:radius:), JSONDecoder.create(keyEncodingStrategy:) / JSONEncoder.create(keyEncodingStrategy:), DecodingError.Context.init(debugDescription:underlyingError:), Logger.elapsedTimePrefix(), GitInfo, PointOfInterest.customerID, Itinerary.legsSegments, Itinerary.toGeoJsonItinerary(), the legsSteps setter, NavigationInstructions.direction, CoordinateSpan, DispatchQueue.computation / navigation / network, and GeoAR's ShaderTypes.h symbols (BufferIndices, TextureIndices, VertexAttributes and the k* constants).

Changes that compile but behave differently​

Nothing in this list produces a compiler error. Check each one against your app.

ChangeWhat to do
isLoaded had been true after a failure tooits equivalent is !loadPhase.isLoading, not loadPhase.isReady
A map that fails to load settles .failedawaitLoaded() throws instead of suspending forever — handle it
A coordinate's time is encoded in Unix secondsif you persisted or forwarded encoded coordinates, re-check the unit
Coordinate.bearing of -1 is encoded now (it means 359°)it is no longer dropped as an invalid sentinel; accuracy is sent only when positive
MapCameraState equality is exact, and ignores lastChangeReasona camera you built and the one the map reports after applying it differ by float noise, so compare camera positions instead; equal states hash the same
The user location indicator greys the moment tracking is lostit no longer stays blue for staleStateTimeout
The attribution sheet is presented from the hosting view controllerfound up the responder chain, not the app's topmost controller
startNavigation sets userTrackingMode itselfit follows with heading when navigation starts
A second MapView or GeoARView on one session evicts the firstone view of each kind per session; a second map needs its own
A stream finishes when its owner is deallocatedcode after a for await loop runs once the view, manager or source goes away — see Getting Started with Wemap SDKs § Observing streams
Two Itinerary instances are equal only when they are the same instancean itinerary computed twice over the same route gives two unequal ones — keep the instance you added to remove it from the map or to compare it with the navigated one
Coordinate's == is exacttwo coordinates that differ by float noise, such as a computed projection and a stored point, are no longer equal; use isApproximatelyEqual(to:) for those. A Set or Dictionary of coordinates is now reliable
Two CLLocations compare by identity again, as Apple's dothe SDK no longer overrides isEqual(_:) to compare only coordinate and altitude; compare coordinate and altitude, or use distance(from:)
A backend's failed HTTP status throws WemapError.requestFailed(statusCode:reason:)a catch matching URLError(.badServerResponse) no longer catches it; match WemapError.requestFailed
ItineraryProviding.itineraries throws when no route existsDirectionsServiceError.noItinerariesFound replaces the empty array; handle it where you tested isEmpty
Route computations and requests time outcomputeItineraries, sortPOIsByGraphDistance, sortPOIsByDuration and ItineraryProviding fail with WemapError.timeout after 30 seconds, or, on an offline map, once a longer computation ends; every other request fails after 20 seconds without data, down from 60
The location is projected onto the route only within a maximum distance15 meters indoors and 50 outdoors by default; beyond it the user indicator leaves the route. Raise ProjectionOptions.indoorMaxDistance / outdoorMaxDistance to keep the previous behaviour
selectPOI and centerToPOI without a zoom never zoom outthey zoom in to 18 only when the map is further out; tapping a POI recenters without changing the zoom. Pass a zoom to force one
Out-of-range config values are moved into their documented rangea timeout, threshold, distance or VPS setting outside the range its documentation states is clamped and logged instead of used as given, or crashing; check the log if a value seems ignored

"I'm getting this error"​

ErrorGo to
cannot find 'WemapCore' in scopeStep 2
cannot find 'WemapMap' in scopeStep 2
'mapData' is inaccessible due to '@_spi' protection levelStep 2
argument 'session' missingStep 2
cannot assign to property: 'environment' is a 'let' constantStep 3
cannot find 'CoreConstants' / 'MapConstants' / 'ARConstants' in scopeStep 3
value of type 'Coordinate' has no member 'direction'Step 4
cannot convert value of type '[Float]' to expected argument type 'Levels'Step 4
value of type 'Coordinate' has no member 'location'Step 4
cannot find 'shortDescription' in scopeStep 4
value of type '…' has no member 'filterByTag' / 'removeFilters'Step 6
cannot find type 'TagMatchMode' in scopeStep 6
incorrect argument label in call (have 'itineraryRecalculationEnabled:…') and the likeStep 3
value of type 'AnyPublisher<…>' has no member 'sink' after a renameStep 6
call is 'async' but is not marked with 'await'Step 6
main actor-isolated property … can not be referenced from a nonisolated contextStep 6
cannot find type 'MapViewDelegate' in scopeStep 7
initializer for conditional binding must have Optional type, not 'NavigationManager'Step 7
call can throw but is not marked with 'try' on VPSARKitLocationSource.initStep 8
cannot find type 'VPSARKitLocationSourceDelegate' in scopeStep 8
cannot find type 'PackdataManaging' in scopeStep 9
type 'MyLocationSource' does not conform to protocol 'Sendable'Step 11
type 'MyLocationSource' does not conform to protocol 'LocationSource'Step 11
is inaccessible due to '@_spi' protection levelStep 12
initializer is inaccessible due to 'internal' protection levelStep 12
value of type 'LegSegment' has no member 'distance' (or levels, direction)Step 12
type 'Packdata' does not conform to protocol 'Encodable', or 'Decodable' for another modelStep 12
cannot find 'customerID' / 'legsSegments' / 'GitInfo' in scopeStep 12

Reference: renamed, moved and removed API​

v0.x symbolv1.0 replacementStep
ARConstantsARNavigationStyle3
Coordinate.directionCoordinate.bearing4
Coordinate.direction(to:) / coordinate(at:facing:)bearing(to:) / destination(distance:bearing:)4
Coordinate.locationCoordinate.toLocation()4
CoreConstantsSessionConfig3
GeoARViewDelegateloadPhase / loadPhases / awaitLoaded()10
ItineraryManager.getItineraries(…)computeItineraries(…)6
ItineraryServiceDirectionsService6
Level (Core)Level (Map SDK), now a struct4
LegSegment.distance / levels / coordinates / directionLegSegment.segment.distance / … / segment.bearing12
LocationSource.start() / stop() (implemented)startUpdating(delegate:) / stopUpdating()11
LocationSource.supportsHeadingsupportsAttitude11
MapConstants.staleStateTimeoutUserLocationManager.staleStateTimeout (DispatchTimeInterval)3
MapView.zoomWhileFollowingzoomWhileTracking3
MapViewDelegateloadPhase / loadPhases / touchedPoints7
NavigationError.failedToRetriveUserLocationNavigationError.failedToRetrieveUserLocation—
NavigationError.unknown(error:)removed; the SDK never threw it—
PackdataManagingPackdataServicing9
PointOfInterestManaging.addPOI(_:) / addPOIs(_:) / removePOI(_:) / removePOIs(_:)the same, on ARPointOfInterestManaging only10
PointOfInterestManaging.filterByTag(_:) / filterByTags(…)PointOfInterestManaging.tagFilter6
PointOfInterestManaging.removeFilters()tagFilter = nil6
Segment.directionSegment.bearing4
ShortStringConvertibleCustomCompactStringConvertible4
Step.Kind.exitRondaboutStep.Kind.exitRoundabout—
TagMatchModePointOfInterestTagFilter6
UserLocationViewStyles.outOfActiveLevelOpacityoutOfActiveLevelAlpha3
VPSARKitConstantsVPSConfig8
Bundle.core.version / .map.version / .geoAR.version / .positioningVPSARKit.versionWemapSDKs.version12
WemapCore.sharedCoreSession2
WemapMap.getMapData(mapID:token:)MapSession(mapID:token:config:)2
……

Getting help​

Sample apps: wemap-sdk-sample-apps-ios. Anything unclear or missing here — contact the Wemap team.