Skip to content

Commit c97f5fc

Browse files
Prepare iOS release 3.20.0 (#13138)
* Prepare iOS release 3.20.0 * Update Dash changelog for v3.20.0 * removed previous workaround --------- Co-authored-by: Viktor Kononov <viktor.kononov@mapbox.com> # Conflicts: # projects/mapbox-navigation-ios-internal/mapbox-navigation-ios/CHANGELOG.md
1 parent 4047e95 commit c97f5fc

File tree

4 files changed

+20
-24
lines changed

4 files changed

+20
-24
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changes to the Mapbox Navigation SDK for iOS
22

3+
## 3.20.0
4+
5+
### Packaging
6+
7+
* MapboxNavigationCore now requires [MapboxMaps v11.20.0](https://github.com/mapbox/mapbox-maps-ios/releases/tag/v11.20.0)
8+
* MapboxNavigationCore now requires [MapboxNavigationNative v324.20.0](https://github.com/mapbox/mapbox-navigation-native-ios/releases/tag/v324.20.0)
9+
10+
### Other changes
11+
12+
* Fixed a race condition in `URLDataCache`.
13+
* Removed redundant style application from `NavigationViewController` style manager setup.
14+
315
## 3.20.0-rc.1
416

517
### Packaging

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.20.0-rc.1", "dd39c77a51b10ff63c3fbb55824b62e4f3da179b81d88721ab120202f1cf3e31", "74928b3aadc1d0c7c3677ff8e2730e8f10a99778")
7-
let mapsVersion: Version = "11.20.0-rc.1"
6+
let (navNativeVersion, navNativeChecksum, navNativeRevision) = ("324.20.0", "219688d51e06b5c4080d1ba7b9636fcdcf7b20e09525205560faeb44d5dac0bb", "91d2dff0691a6f1def37d6898394d3f440bc4632")
7+
let mapsVersion: Version = "11.20.0"
88

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

Sources/MapboxNavigationCore/Navigator/AlternativeRoute.swift

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -197,28 +197,12 @@ extension Route {
197197
return nil
198198
}
199199

200-
// TODO: revert back when updating to stable NN v324.20.0
201-
// guard let intersectionIndex = leg.steps[stepindex].segmentIndicesByIntersection?
202-
// .firstIndex(where: { $0 == segmentIndex })
203-
// else {
204-
// return nil
205-
// }
206-
let indices = leg.steps[stepindex].segmentIndicesByIntersection
207-
var closest = (-1, Int.max)
208-
let threshold = 3
209-
for (offset, index) in (indices ?? []).enumerated() {
210-
guard let index,
211-
index <= segmentIndex else { break }
212-
let distance = segmentIndex - index
213-
if distance < threshold,
214-
distance < closest.1
215-
{
216-
closest = (offset, distance)
217-
guard distance != 0 else { break }
218-
}
200+
guard let intersectionIndex = leg.steps[stepindex].segmentIndicesByIntersection?
201+
.firstIndex(where: { $0 == segmentIndex })
202+
else {
203+
return nil
219204
}
220-
guard closest.0 != -1 else { return nil }
221205

222-
return leg.steps[stepindex].intersections?[closest.0]
206+
return leg.steps[stepindex].intersections?[intersectionIndex]
223207
}
224208
}
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.20.0-rc.1"
4+
public static let mapboxNavigationVersion: String = "3.20.0"
55
public static let mapboxNavigationUXBundleIdentifier: String = "com.mapbox.navigationUX"
66
}

0 commit comments

Comments
 (0)