v3.16.0
Packaging
- MapboxNavigationCore now requires MapboxMaps v11.16.0
- MapboxNavigationCore now requires MapboxNavigationNative v324.16.0
API Deprecations
ViewportState.routeProgressis deprecated and is alwaysnilnow. UseViewportState.navigationProgressinstead.ViewportState.headingis deprecated and is alwaysnilnow. UseViewportState.navigationHeadinginstead.ViewportState.locationis deprecated in favor ofViewportState.navigationLocationinstead.ViewportState.init(location:routeProgress:viewportPadding:heading:)is deprecated in favor ofViewportState.init(navigationLocation:navigationProgress:viewportPadding:navigationHeading:).NavigationRoute.nativeRoute,NavigationRoute.init?(nativeRoute:), andAlternativeRoute.init?(mainRoute:alternativeRoute:)are deprecated and should no longer be used.CoreConfig.routeRequestConfigis deprecated. Configure request options directly usingRouteOptionsandMatchOptions.TelemetryAppMetadata.userIdandTelemetryAppMetadata.sessionIdare deprecated and no longer have any effect.
Routing
- Fixed an issue where request parameters could be lost on reroutes when using a custom
RouteOptionssubclass. If you subclassRouteOptions, make sure to implementurlQueryItems,init(from:),encode(to:), andinit(waypoints:profileIdentifier:queryItems:). NavigationRouteOptions.init(waypoints:profileIdentifier:queryItems:)andNavigationMatchOptions.init(waypoints:profileIdentifier:queryItems:)set the default values forshapeFormat,locale,distanceMeasurementSystem,routeShapeResolution,includesSpokenInstructions, andincludesVisualInstructionsonly if the values were not passed inqueryItems.RoutingConfig.datasetProfileIdentifierwas added to configure the dataset profile for routing tiles. It is important to set this value before initializingMapboxNavigationProviderand use the same value for the followingProfileIdentifierin route requests options.- Fixed an issue where authentication route request parameters could be duplicated when using a custom
DirectionsOptionssubclass.
Navigation Camera
- When implementing a custom
ViewportDataSourcefor the navigation camera, migrate toviewportState.navigationProgressfor tracking active guidance progress.
Map
- Fixed the crash on an alternative map route annotation offset calculation when a deviation point is further than 80% of the main route.
CarPlay
-
Fixed an incorrect
CarPlayActivityvalue passed inCarPlayManagerDelegatefunction calls:carPlayManager(_:, leadingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),carPlayManager(_:, trailingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),carPlayManager(_:, mapButtonsCompatibleWith traitCollection:, in:, for:).
Now
CarPlayActivity.panningInBrowsingModeandCarPlayActivity.panningInNavigationModeare passed in the above delegate function calls when the map is panned after showing the panning interface. Previously, those values were only passed at the moment of initial presentation of the panning interface and immediately after performing any panning (or any action that exits the map camera's follow mode), the passedCarPlayActivitywas reverted toCarPlayActivity.browsingorCarPlayActivity.navigatingeven though the panning interface was still shown.In addition,
CarPlayManager.currentActivityis also updated correctly in the mentioned scenarios. -
Fixed a problem that navigation bar buttons would not be updated properly for navigation mode when customized with
CarPlayManagerDelegateimplementation, because of too early execution of calls toCarPlayManagerDelegatefunctions:carPlayManager(_:, leadingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),carPlayManager(_:, trailingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),carPlayManager(_:, mapButtonsCompatibleWith traitCollection:, in:, for:).
Those calls were previously executed before
CarPlayNavigationViewControllerinstantiation. Now they are performed afterCarPlayNavigationViewControllerinstantiation, right after callingCarPlayManagerDelegate.carPlayManager(_:, willPresent:).
Other changes
- Fixed a possible race condition in
NavigationCamerastate updates. - Fixed memory leaks caused by
Task.detachedusage inNavigationController. - Fixed memory leaks in
NWPathMonitorcaused by a non-stopped monitor. - Removed excessive
Sendableconformance for types from Turf and Maps. StepsViewController.measurementSystemis now public.