Skip to content

Commit d687616

Browse files
committed
Merge branch 'main' into maxim/add-car-play-example
# Conflicts: # Podfile # Podfile.lock
2 parents 7e31388 + 5dff4d5 commit d687616

10 files changed

+55
-67
lines changed

DocsCode/NavigationTutorial/NavigationTutorialViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class ViewController: UIViewController {
154154
// Customize the route line color and width
155155
var lineLayer = LineLayer(id: "routeLayer")
156156
lineLayer.source = sourceIdentifier
157-
lineLayer.lineColor = .constant(.init(color: UIColor(red: 0.1897518039, green: 0.3010634184, blue: 0.7994888425, alpha: 1.0)))
157+
lineLayer.lineColor = .constant(.init(UIColor(red: 0.1897518039, green: 0.3010634184, blue: 0.7994888425, alpha: 1.0)))
158158
lineLayer.lineWidth = .constant(3)
159159

160160
// Add the style layer of the route line to the map

Navigation-Examples.xcodeproj/project.pbxproj

-6
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@
542542
"${PODS_ROOT}/Target Support Files/Pods-Navigation-Examples/Pods-Navigation-Examples-frameworks.sh",
543543
"${BUILT_PRODUCTS_DIR}/MapboxCoreNavigation/MapboxCoreNavigation.framework",
544544
"${BUILT_PRODUCTS_DIR}/MapboxDirections-pre/MapboxDirections.framework",
545-
"${BUILT_PRODUCTS_DIR}/MapboxGeocoder.swift/MapboxGeocoder.framework",
546545
"${BUILT_PRODUCTS_DIR}/MapboxMaps/MapboxMaps.framework",
547546
"${BUILT_PRODUCTS_DIR}/MapboxNavigation/MapboxNavigation.framework",
548547
"${BUILT_PRODUCTS_DIR}/MapboxSpeech-pre/MapboxSpeech.framework",
@@ -558,7 +557,6 @@
558557
outputPaths = (
559558
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxCoreNavigation.framework",
560559
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxDirections.framework",
561-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxGeocoder.framework",
562560
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMaps.framework",
563561
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxNavigation.framework",
564562
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxSpeech.framework",
@@ -628,7 +626,6 @@
628626
"${PODS_ROOT}/Target Support Files/Pods-CarPlayExample/Pods-CarPlayExample-frameworks.sh",
629627
"${BUILT_PRODUCTS_DIR}/MapboxCoreNavigation/MapboxCoreNavigation.framework",
630628
"${BUILT_PRODUCTS_DIR}/MapboxDirections-pre/MapboxDirections.framework",
631-
"${BUILT_PRODUCTS_DIR}/MapboxGeocoder.swift/MapboxGeocoder.framework",
632629
"${BUILT_PRODUCTS_DIR}/MapboxMaps/MapboxMaps.framework",
633630
"${BUILT_PRODUCTS_DIR}/MapboxNavigation/MapboxNavigation.framework",
634631
"${BUILT_PRODUCTS_DIR}/MapboxSpeech-pre/MapboxSpeech.framework",
@@ -644,7 +641,6 @@
644641
outputPaths = (
645642
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxCoreNavigation.framework",
646643
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxDirections.framework",
647-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxGeocoder.framework",
648644
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMaps.framework",
649645
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxNavigation.framework",
650646
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxSpeech.framework",
@@ -741,7 +737,6 @@
741737
"${PODS_ROOT}/Target Support Files/Pods-DocsCode/Pods-DocsCode-frameworks.sh",
742738
"${BUILT_PRODUCTS_DIR}/MapboxCoreNavigation/MapboxCoreNavigation.framework",
743739
"${BUILT_PRODUCTS_DIR}/MapboxDirections-pre/MapboxDirections.framework",
744-
"${BUILT_PRODUCTS_DIR}/MapboxGeocoder.swift/MapboxGeocoder.framework",
745740
"${BUILT_PRODUCTS_DIR}/MapboxMaps/MapboxMaps.framework",
746741
"${BUILT_PRODUCTS_DIR}/MapboxNavigation/MapboxNavigation.framework",
747742
"${BUILT_PRODUCTS_DIR}/MapboxSpeech-pre/MapboxSpeech.framework",
@@ -757,7 +752,6 @@
757752
outputPaths = (
758753
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxCoreNavigation.framework",
759754
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxDirections.framework",
760-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxGeocoder.framework",
761755
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMaps.framework",
762756
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxNavigation.framework",
763757
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxSpeech.framework",

Navigation-Examples/Examples/Building-Extrusion.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ class BuildingExtrusionViewController: UIViewController, NavigationMapViewDelega
152152

153153
func toggleDayNightStyle() {
154154
let style = navigationMapView.mapView?.mapboxMap.style
155-
if style?.uri?.rawValue == MapboxMaps.Style.navigationNightStyleURL.absoluteString {
156-
style?.uri = StyleURI(url: MapboxMaps.Style.navigationDayStyleURL)
155+
if style?.uri == StyleURI.navigationNight {
156+
style?.uri = StyleURI.navigationDay
157157
} else {
158-
style?.uri = StyleURI(url: MapboxMaps.Style.navigationNightStyleURL)
158+
style?.uri = StyleURI.navigationNight
159159
}
160160
}
161161

Navigation-Examples/Examples/Custom-Destination-Marker.swift

+4-5
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,9 @@ extension CustomDestinationMarkerController: NavigationMapViewDelegate {
120120

121121
// `PointAnnotationManager` is used to manage `PointAnnotation`s and is also exposed as
122122
// a property in `NavigationMapView.pointAnnotationManager`. After any modifications to the
123-
// `PointAnnotation` changes must be synchronized with `PointAnnotationManager.syncAnnotations(_:)`
124-
// method. To remove all annotations for specific `PointAnnotationManager`, call method below with
125-
// an empty array.
126-
pointAnnotationManager.syncAnnotations([finalDestinationAnnotation])
123+
// `PointAnnotation` changes must be applied to `PointAnnotationManager.annotations`
124+
// array. To remove all annotations for specific `PointAnnotationManager`, set an empty array.
125+
pointAnnotationManager.annotations = [finalDestinationAnnotation]
127126
}
128127
}
129128

@@ -141,7 +140,7 @@ extension CustomDestinationMarkerController: NavigationViewControllerDelegate {
141140
finalDestinationAnnotation.image = .default
142141
}
143142

144-
pointAnnotationManager.syncAnnotations([finalDestinationAnnotation])
143+
pointAnnotationManager.annotations = [finalDestinationAnnotation]
145144
}
146145

147146
func navigationViewControllerDidDismiss(_ navigationViewController: NavigationViewController, byCanceling canceled: Bool) {

Navigation-Examples/Examples/Custom-Waypoints.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ class CustomWaypointsViewController: UIViewController {
140140
0.5
141141
1
142142
}
143-
circleLayer.circleColor = .constant(.init(color: UIColor(red: 0.9, green: 0.9, blue: 0.9, alpha: 1.0)))
143+
circleLayer.circleColor = .constant(.init(UIColor(red: 0.9, green: 0.9, blue: 0.9, alpha: 1.0)))
144144
circleLayer.circleOpacity = .expression(opacity)
145145
circleLayer.circleRadius = .constant(.init(10))
146-
circleLayer.circleStrokeColor = .constant(.init(color: UIColor.black))
146+
circleLayer.circleStrokeColor = .constant(.init(UIColor.black))
147147
circleLayer.circleStrokeWidth = .constant(.init(1))
148148
circleLayer.circleStrokeOpacity = .expression(opacity)
149149
return circleLayer
@@ -168,7 +168,7 @@ class CustomWaypointsViewController: UIViewController {
168168
1
169169
})
170170
symbolLayer.textHaloWidth = .constant(.init(0.25))
171-
symbolLayer.textHaloColor = .constant(.init(color: UIColor.black))
171+
symbolLayer.textHaloColor = .constant(.init(UIColor.black))
172172
return symbolLayer
173173
}
174174

Navigation-Examples/Examples/Route-Alerts.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ extension MapboxCoreNavigation.RouteAlert: CustomStringConvertible {
133133
let distance = Int64(self.distanceToStart)
134134
guard distance > 0 && distance < 500 else { return "" }
135135

136-
switch roadObject.type {
136+
switch roadObject.kind {
137137
case .incident(let incident?):
138138
return "\(incident.alertDescription) in \(distance)m."
139139
case .tunnel(let alert?):

Navigation-Examples/Examples/Route-Lines-Styling.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ extension RouteLinesStylingViewController: NavigationMapViewDelegate {
213213
// main or alternative, and whether route is casing or not. For example: identifier for
214214
// main route line will look like this: `0x0000600001168000.main.route_line`, and for
215215
// alternative route line casing will look like this: `0x0000600001ddee80.alternative.route_line_casing`.
216-
lineLayer.lineColor = .constant(.init(color: identifier.contains("main") ? #colorLiteral(red: 0.337254902, green: 0.6588235294, blue: 0.9843137255, alpha: 1) : #colorLiteral(red: 0.6, green: 0.6, blue: 0.6, alpha: 1)))
216+
lineLayer.lineColor = .constant(.init(identifier.contains("main") ? #colorLiteral(red: 0.337254902, green: 0.6588235294, blue: 0.9843137255, alpha: 1) : #colorLiteral(red: 0.6, green: 0.6, blue: 0.6, alpha: 1)))
217217
lineLayer.lineWidth = .expression(lineWidthExpression())
218218
lineLayer.lineJoin = .constant(.round)
219219
lineLayer.lineCap = .constant(.round)
@@ -227,7 +227,7 @@ extension RouteLinesStylingViewController: NavigationMapViewDelegate {
227227

228228
// Based on information stored in `identifier` property (whether route line is main or not)
229229
// route line will be colored differently.
230-
lineLayer.lineColor = .constant(.init(color: identifier.contains("main") ? #colorLiteral(red: 0.1843137255, green: 0.4784313725, blue: 0.7764705882, alpha: 1) : #colorLiteral(red: 0.4, green: 0.4, blue: 0.4, alpha: 1)))
230+
lineLayer.lineColor = .constant(.init(identifier.contains("main") ? #colorLiteral(red: 0.1843137255, green: 0.4784313725, blue: 0.7764705882, alpha: 1) : #colorLiteral(red: 0.4, green: 0.4, blue: 0.4, alpha: 1)))
231231
lineLayer.lineWidth = .expression(lineWidthExpression(1.2))
232232
lineLayer.lineJoin = .constant(.round)
233233
lineLayer.lineCap = .constant(.round)
@@ -249,7 +249,7 @@ extension RouteLinesStylingViewController: NavigationViewControllerDelegate {
249249
func navigationViewController(_ navigationViewController: NavigationViewController, routeLineLayerWithIdentifier identifier: String, sourceIdentifier: String) -> LineLayer? {
250250
var lineLayer = LineLayer(id: identifier)
251251
lineLayer.source = sourceIdentifier
252-
lineLayer.lineColor = .constant(.init(color: identifier.contains("main") ? #colorLiteral(red: 0.337254902, green: 0.6588235294, blue: 0.9843137255, alpha: 1) : #colorLiteral(red: 0.6, green: 0.6, blue: 0.6, alpha: 1)))
252+
lineLayer.lineColor = .constant(.init(identifier.contains("main") ? #colorLiteral(red: 0.337254902, green: 0.6588235294, blue: 0.9843137255, alpha: 1) : #colorLiteral(red: 0.6, green: 0.6, blue: 0.6, alpha: 1)))
253253
lineLayer.lineWidth = .expression(lineWidthExpression())
254254
lineLayer.lineJoin = .constant(.round)
255255
lineLayer.lineCap = .constant(.round)
@@ -260,7 +260,7 @@ extension RouteLinesStylingViewController: NavigationViewControllerDelegate {
260260
func navigationViewController(_ navigationViewController: NavigationViewController, routeCasingLineLayerWithIdentifier identifier: String, sourceIdentifier: String) -> LineLayer? {
261261
var lineLayer = LineLayer(id: identifier)
262262
lineLayer.source = sourceIdentifier
263-
lineLayer.lineColor = .constant(.init(color: identifier.contains("main") ? #colorLiteral(red: 0.1843137255, green: 0.4784313725, blue: 0.7764705882, alpha: 1) : #colorLiteral(red: 0.4, green: 0.4, blue: 0.4, alpha: 1)))
263+
lineLayer.lineColor = .constant(.init(identifier.contains("main") ? #colorLiteral(red: 0.1843137255, green: 0.4784313725, blue: 0.7764705882, alpha: 1) : #colorLiteral(red: 0.4, green: 0.4, blue: 0.4, alpha: 1)))
264264
lineLayer.lineWidth = .expression(lineWidthExpression(1.2))
265265
lineLayer.lineJoin = .constant(.round)
266266
lineLayer.lineCap = .constant(.round)

Navigation-Examples/Examples/Upcoming-Intersection.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class ElectronicHorizonEventsViewController: UIViewController {
144144
RouteLineWidthByZoomLevel.mapValues { $0 * 0.5 }
145145
}
146146
)
147-
layer.lineColor = .constant(.init(color: UIColor.green.withAlphaComponent(0.9)))
147+
layer.lineColor = .constant(.init(UIColor.green.withAlphaComponent(0.9)))
148148
layer.lineCap = .constant(.round)
149149
layer.lineJoin = .constant(.miter)
150150
layer.minZoom = 9

Podfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
platform :ios, '11.0'
22
use_frameworks!
33

4-
pod 'MapboxCoreNavigation', :git => 'https://github.com/mapbox/mapbox-navigation-ios.git', :branch => 'maxim/car-play-refactoring'
5-
pod 'MapboxNavigation', :git => 'https://github.com/mapbox/mapbox-navigation-ios.git', :branch => 'maxim/car-play-refactoring'
6-
pod 'MapboxGeocoder.swift', '~> 0.14'
4+
pod 'MapboxCoreNavigation', :git => 'https://github.com/mapbox/mapbox-navigation-ios.git', :tag => 'v2.0.0-rc.2'
5+
pod 'MapboxNavigation', :git => 'https://github.com/mapbox/mapbox-navigation-ios.git', :tag => 'v2.0.0-rc.2'
76

87
target 'Navigation-Examples' do
98
end

Podfile.lock

+36-40
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,43 @@
11
PODS:
2-
- MapboxCommon (16.2.0)
3-
- MapboxCoreMaps (10.0.0-rc.6):
4-
- MapboxCommon (~> 16.2)
5-
- MapboxCoreNavigation (2.0.0-beta.23):
6-
- MapboxDirections-pre (= 2.0.0-beta.8)
2+
- MapboxCommon (18.0.0)
3+
- MapboxCoreMaps (10.0.0-rc.8):
4+
- MapboxCommon (~> 18.0)
5+
- MapboxCoreNavigation (2.0.0-rc.2):
6+
- MapboxDirections-pre (= 2.0.0-rc.1)
77
- MapboxMobileEvents (~> 1.0.0)
8-
- MapboxNavigationNative (~> 63.0)
8+
- MapboxNavigationNative (~> 66.0)
99
- Turf (= 2.0.0-rc.1)
10-
- MapboxDirections-pre (2.0.0-beta.8):
10+
- MapboxDirections-pre (2.0.0-rc.1):
1111
- Polyline (~> 5.0)
1212
- Turf (~> 2.0.0-rc.1)
13-
- MapboxGeocoder.swift (0.14.0)
14-
- MapboxMaps (10.0.0-rc.6):
15-
- MapboxCommon (= 16.2.0)
16-
- MapboxCoreMaps (= 10.0.0-rc.6)
17-
- MapboxMobileEvents (= 1.0.2)
13+
- MapboxMaps (10.0.0-rc.8):
14+
- MapboxCommon (= 18.0.0)
15+
- MapboxCoreMaps (= 10.0.0-rc.8)
16+
- MapboxMobileEvents (= 1.0.3)
1817
- Turf (= 2.0.0-rc.1)
19-
- MapboxMobileEvents (1.0.2)
20-
- MapboxNavigation (2.0.0-beta.23):
21-
- MapboxCoreNavigation (= 2.0.0-beta.23)
22-
- MapboxMaps (= 10.0.0-rc.6)
18+
- MapboxMobileEvents (1.0.3)
19+
- MapboxNavigation (2.0.0-rc.2):
20+
- MapboxCoreNavigation (= 2.0.0-rc.2)
21+
- MapboxMaps (= 10.0.0-rc.8)
2322
- MapboxMobileEvents (~> 1.0.0)
24-
- MapboxSpeech-pre (= 2.0.0-alpha.1)
23+
- MapboxSpeech-pre (= 2.0.0-rc.1)
2524
- Solar-dev (~> 3.0)
26-
- MapboxNavigationNative (63.1.0):
27-
- MapboxCommon (~> 16.2)
28-
- MapboxSpeech-pre (2.0.0-alpha.1)
25+
- MapboxNavigationNative (66.0.3):
26+
- MapboxCommon (~> 18.0)
27+
- MapboxSpeech-pre (2.0.0-rc.1)
2928
- Polyline (5.0.2)
3029
- Solar-dev (3.0.1)
3130
- Turf (2.0.0-rc.1)
3231

3332
DEPENDENCIES:
34-
- MapboxCoreNavigation (from `https://github.com/mapbox/mapbox-navigation-ios.git`, branch `maxim/car-play-refactoring`)
35-
- MapboxGeocoder.swift (~> 0.14)
36-
- MapboxNavigation (from `https://github.com/mapbox/mapbox-navigation-ios.git`, branch `maxim/car-play-refactoring`)
33+
- MapboxCoreNavigation (from `https://github.com/mapbox/mapbox-navigation-ios.git`, tag `v2.0.0-rc.2`)
34+
- MapboxNavigation (from `https://github.com/mapbox/mapbox-navigation-ios.git`, tag `v2.0.0-rc.2`)
3735

3836
SPEC REPOS:
3937
trunk:
4038
- MapboxCommon
4139
- MapboxCoreMaps
4240
- MapboxDirections-pre
43-
- MapboxGeocoder.swift
4441
- MapboxMaps
4542
- MapboxMobileEvents
4643
- MapboxNavigationNative
@@ -51,35 +48,34 @@ SPEC REPOS:
5148

5249
EXTERNAL SOURCES:
5350
MapboxCoreNavigation:
54-
:branch: maxim/car-play-refactoring
5551
:git: https://github.com/mapbox/mapbox-navigation-ios.git
52+
:tag: v2.0.0-rc.2
5653
MapboxNavigation:
57-
:branch: maxim/car-play-refactoring
5854
:git: https://github.com/mapbox/mapbox-navigation-ios.git
55+
:tag: v2.0.0-rc.2
5956

6057
CHECKOUT OPTIONS:
6158
MapboxCoreNavigation:
62-
:commit: 5c35d7000cd39ce116da627341732a5b1df6b74c
6359
:git: https://github.com/mapbox/mapbox-navigation-ios.git
60+
:tag: v2.0.0-rc.2
6461
MapboxNavigation:
65-
:commit: 5c35d7000cd39ce116da627341732a5b1df6b74c
6662
:git: https://github.com/mapbox/mapbox-navigation-ios.git
63+
:tag: v2.0.0-rc.2
6764

6865
SPEC CHECKSUMS:
69-
MapboxCommon: 4fd3d1f439655efbe0108ecd45406924054071aa
70-
MapboxCoreMaps: 045ecad9bb77931e221edc122a66848d778ea87c
71-
MapboxCoreNavigation: 4184e9283aa8654d03d900dbf1813af6c1697b6e
72-
MapboxDirections-pre: ac837a27e6f023ea9abcc00dff53d17b080023d2
73-
MapboxGeocoder.swift: a288e92ec13fbd65bbdfd7c54c61b0e80d19e734
74-
MapboxMaps: de9ac5e180c0a5957619a8642b96767108d2f9b4
75-
MapboxMobileEvents: 9775eb995e06cc3ea10894bf6ab111683c8e73e7
76-
MapboxNavigation: cd28ef804d6025d23ad9d3a935ab0273f7163dec
77-
MapboxNavigationNative: 8d81ec51c9e76da2a9b7a0106eb8b526042d7c81
78-
MapboxSpeech-pre: aeb16de604d07ceb4195150c3359d5401bb298e6
66+
MapboxCommon: ea974a60b24bf4ce16314a5c99384512e7d5aa4e
67+
MapboxCoreMaps: 130eab4f9861dbb9b09b5e25b65ce701dec4a91a
68+
MapboxCoreNavigation: 84980abf07a94972634ed1e27a99b403c477061b
69+
MapboxDirections-pre: 25013fec9715dbc17c1c1798da3105e9b3140cd9
70+
MapboxMaps: 10ffa18d5543a7ac5a2d4973647197f15e624baa
71+
MapboxMobileEvents: 852274da39a3ed9a56dfff3bab64a055d23768c7
72+
MapboxNavigation: 265f6a34546c6258d58f1818d879c99fdd0732e6
73+
MapboxNavigationNative: c8a72b040bb8ac8fd0cc0ad75bae235e51be0f59
74+
MapboxSpeech-pre: c2739e843762ac6b222fb7132ac71903aa750af3
7975
Polyline: fce41d72e1146c41c6d081f7656827226f643dff
8076
Solar-dev: 4612dc9878b9fed2667d23b327f1d4e54e16e8d0
8177
Turf: 4efd14674a1a2f9527b7c0aadde8003a7b73b1be
8278

83-
PODFILE CHECKSUM: a247a3ff0698b3c2e1e7ba58d8d6744eed13967c
79+
PODFILE CHECKSUM: bd3d140d862fdb4058fc189c026b8c2adcbd4cb3
8480

85-
COCOAPODS: 1.10.1
81+
COCOAPODS: 1.11.0

0 commit comments

Comments
 (0)