Skip to content

Commit dd3187e

Browse files
S2Lerkried
authored andcommitted
Update NavNative to 124.0
NavNative breaking changes in RoadName structure required adaptation on SDK side. As part of this: RoadName and Shield was updated to match native side.
1 parent bd034b5 commit dd3187e

15 files changed

Lines changed: 118 additions & 65 deletions

File tree

.breakage-allowlist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
Func CarPlayManagerDelegate.carPlayManagerDidCancelPreview(_:) has been added as a protocol requirement
2-
Constructor MapboxNavigationService.init(history:customRoutingProvider:credentials:eventsManagerType:routerType:customActivityType:) has been removed
2+
Constructor MapboxNavigationService.init(history:customRoutingProvider:credentials:eventsManagerType:routerType:customActivityType:) has been removed
3+
EnumElement RoadName.name has been removed
4+
EnumElement RoadName.code has been removed
5+
Enum RoadName has been changed to a Struct

Cartfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" ~> 23.2.1
2-
binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.xcframework.json" ~> 123.1.0
1+
binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" == 23.3.0-beta.1
2+
binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.xcframework.json" ~> 124.0.0
33
github "mapbox/mapbox-directions-swift" == 2.9.0-rc.2
44
github "mapbox/mapbox-events-ios" ~> 1.0.0

Cartfile.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" "23.2.1"
2-
binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.xcframework.json" "123.1.0"
1+
binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" "23.3.0-beta.1"
2+
binary "https://api.mapbox.com/downloads/v2/carthage/mobile-navigation-native/MapboxNavigationNative.xcframework.json" "124.0.0"
33
github "mapbox/mapbox-directions-swift" "v2.9.0-rc.2"
44
github "mapbox/mapbox-events-ios" "v1.0.10"
55
github "mapbox/turf-swift" "v2.6.1"

Example/ViewController+FreeDrive.swift

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,7 @@ extension ViewController {
158158
guard let metadata = passiveLocationManager?.roadGraph.edgeMetadata(edgeIdentifier: identifier) else {
159159
return []
160160
}
161-
let names = metadata.names.map { name -> String in
162-
switch name {
163-
case .name(let name):
164-
return name
165-
case .code(let code):
166-
return "(\(code))"
167-
}
168-
}
161+
let names = metadata.names.map(\.text)
169162

170163
// If the road is unnamed, fall back to the road class.
171164
if names.isEmpty {

MapboxCoreNavigation.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Pod::Spec.new do |s|
4444
s.requires_arc = true
4545
s.module_name = "MapboxCoreNavigation"
4646

47-
s.dependency "MapboxNavigationNative", "~> 123.1"
47+
s.dependency "MapboxNavigationNative", "~> 124.0"
4848
s.dependency "MapboxDirections-pre", "2.9.0-rc.2"
4949
s.dependency "MapboxMobileEvents", "~> 1.0"
5050

MapboxNavigation-SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MapboxNavigation.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Pod::Spec.new do |s|
4444
s.module_name = "MapboxNavigation"
4545

4646
s.dependency "MapboxCoreNavigation", "#{s.version.to_s}"
47-
s.dependency "MapboxMaps", "~> 10.10"
47+
s.dependency "MapboxMaps", "10.11.0-beta.1"
4848
s.dependency "Solar-dev", "~> 3.0"
4949
s.dependency "MapboxSpeech", "~> 2.0"
5050
s.dependency "MapboxMobileEvents", "~> 1.0"

MapboxNavigation.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@
225225
5A1C075824BDEB44000A6330 /* PassiveLocationProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A1C075724BDEB44000A6330 /* PassiveLocationProvider.swift */; };
226226
5A39B9282498F9890026DFD1 /* PassiveLocationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A39B9272498F9890026DFD1 /* PassiveLocationManager.swift */; };
227227
5A43FC8B24B488DC00BF7943 /* PassiveLocationManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A43FC8A24B488DC00BF7943 /* PassiveLocationManagerTests.swift */; };
228+
7E6CAE392976B346001D749D /* RoadShield.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E6CAE382976B346001D749D /* RoadShield.swift */; };
228229
8A0155E828F8EC72009E299C /* BannerPresentationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A0155E728F8EC72009E299C /* BannerPresentationTests.swift */; };
229230
8A0155EA28F8EC85009E299C /* StackTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A0155E928F8EC85009E299C /* StackTests.swift */; };
230231
8A0155EC28F8ED38009E299C /* PreviewViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A0155EB28F8ED38009E299C /* PreviewViewControllerTests.swift */; };
@@ -897,6 +898,7 @@
897898
5A1C075724BDEB44000A6330 /* PassiveLocationProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PassiveLocationProvider.swift; sourceTree = "<group>"; };
898899
5A39B9272498F9890026DFD1 /* PassiveLocationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PassiveLocationManager.swift; sourceTree = "<group>"; };
899900
5A43FC8A24B488DC00BF7943 /* PassiveLocationManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PassiveLocationManagerTests.swift; sourceTree = "<group>"; };
901+
7E6CAE382976B346001D749D /* RoadShield.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoadShield.swift; sourceTree = "<group>"; };
900902
8A0155E728F8EC72009E299C /* BannerPresentationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BannerPresentationTests.swift; sourceTree = "<group>"; };
901903
8A0155E928F8EC85009E299C /* StackTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StackTests.swift; sourceTree = "<group>"; };
902904
8A0155EB28F8ED38009E299C /* PreviewViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewViewControllerTests.swift; sourceTree = "<group>"; };
@@ -2465,6 +2467,7 @@
24652467
DA5F44F325F07D3A00F573EC /* RoadObjectStoreDelegate.swift */,
24662468
DA5F44F425F07D3B00F573EC /* RoadObjectStore.swift */,
24672469
414119FE26C5269A00402B5D /* RoadSubgraphEdge.swift */,
2470+
7E6CAE382976B346001D749D /* RoadShield.swift */,
24682471
);
24692472
path = EHorizon;
24702473
sourceTree = "<group>";
@@ -3382,6 +3385,7 @@
33823385
353E68FC1EF0B7F8007B2AE5 /* NavigationLocationManager.swift in Sources */,
33833386
2BE7013D25359C7B00F46E4E /* RouteAlert.swift in Sources */,
33843387
2C04E467290A8C6B0067FDCF /* PredictiveCacheNavigationOptions.swift in Sources */,
3388+
7E6CAE392976B346001D749D /* RoadShield.swift in Sources */,
33853389
2B2DC69928F479DE0019232C /* HistoryEvent.swift in Sources */,
33863390
353E68FE1EF0B985007B2AE5 /* BundleAdditions.swift in Sources */,
33873391
2EFAE005264C1F9200B618C4 /* RoadObjectLocation.swift in Sources */,

Package.resolved

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ let package = Package(
2424
dependencies: [
2525
.package(name: "MapboxDirections", url: "https://github.com/mapbox/mapbox-directions-swift.git", .exact("2.9.0-rc.2")),
2626
.package(name: "MapboxMobileEvents", url: "https://github.com/mapbox/mapbox-events-ios.git", from: "1.0.0"),
27-
.package(name: "MapboxNavigationNative", url: "https://github.com/mapbox/mapbox-navigation-native-ios.git", from: "123.1.0"),
28-
.package(name: "MapboxMaps", url: "https://github.com/mapbox/mapbox-maps-ios.git", from: "10.10.1"),
27+
.package(name: "MapboxNavigationNative", url: "https://github.com/mapbox/mapbox-navigation-native-ios.git", from: "124.0.0"),
28+
.package(name: "MapboxMaps", url: "https://github.com/mapbox/mapbox-maps-ios.git", .exact("10.11.0-beta.1")),
2929
.package(name: "Solar", url: "https://github.com/ceeK/Solar.git", from: "3.0.0"),
3030
.package(name: "MapboxSpeech", url: "https://github.com/mapbox/mapbox-speech-swift.git", from: "2.0.0"),
3131
.package(name: "CwlPreconditionTesting", url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", from: "2.1.0"),

0 commit comments

Comments
 (0)