Skip to content

v3.16.0

Choose a tag to compare

@ArtemStepuk ArtemStepuk released this 24 Oct 18:31
· 26 commits to main since this release

Packaging

API Deprecations

  • ViewportState.routeProgress is deprecated and is always nil now. Use ViewportState.navigationProgress instead.
  • ViewportState.heading is deprecated and is always nil now. Use ViewportState.navigationHeading instead.
  • ViewportState.location is deprecated in favor of ViewportState.navigationLocation instead.
  • ViewportState.init(location:routeProgress:viewportPadding:heading:) is deprecated in favor of ViewportState.init(navigationLocation:navigationProgress:viewportPadding:navigationHeading:).
  • NavigationRoute.nativeRoute, NavigationRoute.init?(nativeRoute:), and AlternativeRoute.init?(mainRoute:alternativeRoute:) are deprecated and should no longer be used.
  • CoreConfig.routeRequestConfig is deprecated. Configure request options directly using RouteOptions and MatchOptions.
  • TelemetryAppMetadata.userId and TelemetryAppMetadata.sessionId are deprecated and no longer have any effect.

Routing

  • Fixed an issue where request parameters could be lost on reroutes when using a custom RouteOptions subclass. If you subclass RouteOptions, make sure to implement urlQueryItems, init(from:), encode(to:), and init(waypoints:profileIdentifier:queryItems:).
  • NavigationRouteOptions.init(waypoints:profileIdentifier:queryItems:) and NavigationMatchOptions.init(waypoints:profileIdentifier:queryItems:) set the default values for shapeFormat, locale, distanceMeasurementSystem, routeShapeResolution, includesSpokenInstructions, and includesVisualInstructions only if the values were not passed in queryItems.
  • RoutingConfig.datasetProfileIdentifier was added to configure the dataset profile for routing tiles. It is important to set this value before initializing MapboxNavigationProvider and use the same value for the following ProfileIdentifier in route requests options.
  • Fixed an issue where authentication route request parameters could be duplicated when using a custom DirectionsOptions subclass.

Navigation Camera

  • When implementing a custom ViewportDataSource for the navigation camera, migrate to viewportState.navigationProgress for 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 CarPlayActivity value passed in CarPlayManagerDelegate function calls:

    • carPlayManager(_:, leadingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),
    • carPlayManager(_:, trailingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),
    • carPlayManager(_:, mapButtonsCompatibleWith traitCollection:, in:, for:).

    Now CarPlayActivity.panningInBrowsingMode and CarPlayActivity.panningInNavigationMode are 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 passed CarPlayActivity was reverted to CarPlayActivity.browsing or CarPlayActivity.navigating even though the panning interface was still shown.

    In addition, CarPlayManager.currentActivity is 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 CarPlayManagerDelegate implementation, because of too early execution of calls to CarPlayManagerDelegate functions:

    • carPlayManager(_:, leadingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),
    • carPlayManager(_:, trailingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),
    • carPlayManager(_:, mapButtonsCompatibleWith traitCollection:, in:, for:).

    Those calls were previously executed before CarPlayNavigationViewController instantiation. Now they are performed after CarPlayNavigationViewController instantiation, right after calling CarPlayManagerDelegate.carPlayManager(_:, willPresent:).

Other changes

  • Fixed a possible race condition in NavigationCamera state updates.
  • Fixed memory leaks caused by Task.detached usage in NavigationController.
  • Fixed memory leaks in NWPathMonitor caused by a non-stopped monitor.
  • Removed excessive Sendable conformance for types from Turf and Maps.
  • StepsViewController.measurementSystem is now public.