Skip to content

Commit c46136f

Browse files
authored
[iOS] Update dependencies for v3.11.0-beta.1 (#9639)
1 parent 9e1f60e commit c46136f

File tree

5 files changed

+23
-21
lines changed

5 files changed

+23
-21
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## 3.11.0-beta.1
44

5+
### Packaging
6+
7+
* MapboxNavigationCore now requires [MapboxMaps v11.14.0-beta.1](https://github.com/mapbox/mapbox-maps-ios/releases/tag/11.14.0-beta.1)
8+
* MapboxNavigationCore now requires [MapboxNavigationNative v324.14.0-beta.1](https://github.com/mapbox/mapbox-navigation-native-ios/releases/tag/v324.14.0-beta.1)
9+
510
### Map
611

712
* Added experimental custom route callouts API accessible when importing MapboxNavigationCore with `@_spi(ExperimentalMapboxAPI) import MapboxNavigationCore`. Enable it by setting `NavigationMapView.apiRouteCalloutViewProviderEnabled` to `true`, then configure using `NavigationMapView.routeCalloutViewProvider` property. New `NavigationMapView.showRoutes(_:)` and `NavigationMapView.showcaseRoutes(_:routesPresentationStyle:animated:duration:)` methods are available without `routeAnnotationKinds` parameter but original methods `NavigationMapView.show(_:routeAnnotationKinds:)` and `NavigationMapView.showcase(_:routesPresentationStyle:routeAnnotationKinds:animated:duration:)` also work and their `routeAnnotationKinds` parameter is ignored when `NavigationMapView.apiRouteCalloutViewProviderEnabled` is set to `true`.
@@ -11,6 +16,8 @@
1116
### Routing
1217

1318
* Added the ability to disable the server-side control on refreshed route expiration.
19+
* Dead Reckoning is improved - more robust models for GNSS trust, road calibration, and wheel speed trust.
20+
* Improved main thread utilization by removing unintended locks (visible on systems with the overloaded CPU).
1421

1522
### Other changes
1623

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import PackageDescription
55

6-
let (navNativeVersion, navNativeChecksum, navNativeRevision) = ("324.14.0-alpha.1", "b1767c0e0bd354c56007aae75843aca409e7ab0bb21384947e03d390a14366fc", "4b34fea46345862730d6e35709d693d1c3d36c50")
7-
let mapsVersion: Version = "11.14.0-alpha.1"
6+
let (navNativeVersion, navNativeChecksum, navNativeRevision) = ("324.14.0-beta.1", "25c77f16d18523bbe7482dfbf081f9dd6f21f67d957d60e414b2250cd68b4bed", "0cd10e12467d3bbc3744bc28554b7694d591cd78")
7+
let mapsVersion: Version = "11.14.0-beta.1"
88

99
let package = Package(
1010
name: "MapboxNavigation",

Sources/MapboxNavigationCore/Navigator/Internals/CoreNavigator/CoreNavigator.swift

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,18 @@ final class NativeNavigator: CoreNavigator, @unchecked Sendable {
297297
}
298298

299299
let refreshObserver = NavigatorRouteRefreshObserver(
300-
refreshCallback: { [weak self] routeIdPrefix, routeIndex, _ in
300+
refreshCallback: { [weak self] routeId in
301301
guard let self else { return nil }
302302

303303
guard let primaryRoute = navigator.native.getPrimaryRoute() else { return nil }
304304
let alternativeRoutes = navigator.native.getAlternativeRoutes()
305305

306-
if primaryRoute.matching(routeIdPrefix: routeIdPrefix, routeIndex: routeIndex) {
306+
if primaryRoute.getRouteId() == routeId {
307307
return .mainRoute(primaryRoute)
308308
}
309+
309310
if let refreshedAlternative = alternativeRoutes.first(where: {
310-
$0.route.matching(routeIdPrefix: routeIdPrefix, routeIndex: routeIndex)
311+
$0.route.getRouteId() == routeId
311312
}) {
312313
return .alternativeRoute(alternative: refreshedAlternative)
313314
}
@@ -522,10 +523,3 @@ enum NativeNavigatorError: Swift.Error {
522523
case failedToUpdateRoutes(reason: String)
523524
case failedToUpdateAlternativeRoutes(reason: String)
524525
}
525-
526-
extension RouteInterface {
527-
fileprivate func matching(routeIdPrefix: String, routeIndex: UInt32) -> Bool {
528-
// TODO: (NN-3674) use full routeId instead of just prefix.
529-
getRouteId().starts(with: routeIdPrefix) && getRouteIndex() == routeIndex
530-
}
531-
}

Sources/MapboxNavigationCore/Navigator/Internals/CoreNavigator/NavigatorRouteRefreshObserver.swift

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,22 @@ enum RouteRefreshResult: @unchecked Sendable {
88
}
99

1010
class NavigatorRouteRefreshObserver: RouteRefreshObserver, @unchecked Sendable {
11-
typealias RefreshCallback = (String, UInt32, UInt32) -> RouteRefreshResult?
11+
typealias RefreshCallback = (String) -> RouteRefreshResult?
1212
private var refreshCallback: RefreshCallback
1313

1414
init(refreshCallback: @escaping RefreshCallback) {
1515
self.refreshCallback = refreshCallback
1616
}
1717

1818
func onRouteRefreshAnnotationsUpdated(
19-
forRouteId routeId: String,
19+
for routeIdentifier: RouteIdentifier,
2020
routeRefreshResponse: String,
21-
routeIndex: UInt32,
2221
legIndex: UInt32,
2322
routeGeometryIndex: UInt32
2423
) {
25-
guard let routeRefreshResult = refreshCallback(routeId, routeIndex, legIndex) else {
24+
let routeId = routeIdentifier.getRouteId()
25+
let routeIndex = routeIdentifier.index
26+
guard let routeRefreshResult = refreshCallback(routeId) else {
2627
return
2728
}
2829

@@ -41,19 +42,19 @@ class NavigatorRouteRefreshObserver: RouteRefreshObserver, @unchecked Sendable {
4142
}
4243
}
4344

44-
func onRouteRefreshCancelled(forRouteId routeId: String) {
45+
func onRouteRefreshCancelled(for routeIdentifier: RouteIdentifier) {
4546
let userInfo: [NativeNavigator.NotificationUserInfoKey: any Sendable] = [
46-
.refreshRequestIdKey: routeId,
47+
.refreshRequestIdKey: routeIdentifier.getRouteId(),
4748
]
4849
onMainAsync {
4950
NotificationCenter.default.post(name: .routeRefreshDidCancelRefresh, object: nil, userInfo: userInfo)
5051
}
5152
}
5253

53-
func onRouteRefreshFailed(forRouteId routeId: String, error: RouteRefreshError) {
54+
func onRouteRefreshFailed(for routeIdentifier: RouteIdentifier, error: RouteRefreshError) {
5455
let userInfo: [NativeNavigator.NotificationUserInfoKey: any Sendable] = [
5556
.refreshRequestErrorKey: error,
56-
.refreshRequestIdKey: routeId,
57+
.refreshRequestIdKey: routeIdentifier.getRouteId(),
5758
]
5859
onMainAsync {
5960
NotificationCenter.default.post(name: .routeRefreshDidFailRefresh, object: nil, userInfo: userInfo)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22

33
extension Bundle {
4-
public static let mapboxNavigationVersion: String = "3.11.0-alpha.1"
4+
public static let mapboxNavigationVersion: String = "3.11.0-beta.1"
55
public static let mapboxNavigationUXBundleIdentifier: String = "com.mapbox.navigationUX"
66
}

0 commit comments

Comments
 (0)