From ea63fbc4859d9b45d95e2838a3128eabff7ebfdc Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Tue, 2 Jun 2020 11:26:34 +0300 Subject: [PATCH 01/19] Update MapboxNavNative dependency to v9.2.0. --- Cartfile | 2 +- Cartfile.resolved | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile b/Cartfile index f3a32c4d8e8..c96f09abc0d 100644 --- a/Cartfile +++ b/Cartfile @@ -1,6 +1,6 @@ binary "https://www.mapbox.com/ios-sdk/MapboxAccounts.json" ~> 2.3 binary "https://mapbox-gl-native-ios.s3.amazonaws.com/public/internal/Mapbox-iOS-SDK.json" == 5.9.1000 -binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" == 9.0.4 +binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" == 9.2.0 github "mapbox/mapbox-directions-swift" ~> 0.32 github "mapbox/turf-swift" ~> 0.5 github "mapbox/mapbox-events-ios" ~> 0.10 diff --git a/Cartfile.resolved b/Cartfile.resolved index ed38b4c4cce..ddbbf3569f0 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,6 +1,6 @@ binary "https://mapbox-gl-native-ios.s3.amazonaws.com/public/internal/Mapbox-iOS-SDK.json" "5.9.1000" binary "https://www.mapbox.com/ios-sdk/MapboxAccounts.json" "2.3.0" -binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" "9.0.4" +binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" "9.2.0" github "CedarBDD/Cedar" "v1.0" github "Quick/Nimble" "v8.1.1" github "Quick/Quick" "v2.2.1" From ad29024f144200c41ef265c3beacd1aa858c3d0c Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Tue, 2 Jun 2020 11:28:07 +0300 Subject: [PATCH 02/19] Update code to support MapboxNavNative v9.2.0. --- MapboxCoreNavigation/MBNavigator.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MapboxCoreNavigation/MBNavigator.swift b/MapboxCoreNavigation/MBNavigator.swift index e59ffbe7a50..faa185f1fc1 100644 --- a/MapboxCoreNavigation/MBNavigator.swift +++ b/MapboxCoreNavigation/MBNavigator.swift @@ -15,7 +15,7 @@ extension FixLocation { } /// :nodoc: -extension MBRouteState: CustomStringConvertible { +extension RouteState: CustomStringConvertible { public var description: String { switch self { case .invalid: @@ -30,8 +30,8 @@ extension MBRouteState: CustomStringConvertible { return "offRoute" case .stale: return "stale" - @unknown default: - fatalError("Indescribable route state \(rawValue)") + case .uncertain: + return "uncertain" } } } From 389305cd4d99ac4803b13bb350fb394fd1c9ec8b Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Tue, 2 Jun 2020 11:41:39 +0300 Subject: [PATCH 03/19] Update MapboxNavigationNative to v9.2.1. --- Cartfile | 2 +- Cartfile.resolved | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile b/Cartfile index c96f09abc0d..9c1104fe3e1 100644 --- a/Cartfile +++ b/Cartfile @@ -1,6 +1,6 @@ binary "https://www.mapbox.com/ios-sdk/MapboxAccounts.json" ~> 2.3 binary "https://mapbox-gl-native-ios.s3.amazonaws.com/public/internal/Mapbox-iOS-SDK.json" == 5.9.1000 -binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" == 9.2.0 +binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" == 9.2.1 github "mapbox/mapbox-directions-swift" ~> 0.32 github "mapbox/turf-swift" ~> 0.5 github "mapbox/mapbox-events-ios" ~> 0.10 diff --git a/Cartfile.resolved b/Cartfile.resolved index ddbbf3569f0..e8a417afb5d 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,6 +1,6 @@ binary "https://mapbox-gl-native-ios.s3.amazonaws.com/public/internal/Mapbox-iOS-SDK.json" "5.9.1000" binary "https://www.mapbox.com/ios-sdk/MapboxAccounts.json" "2.3.0" -binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" "9.2.0" +binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" "9.2.1" github "CedarBDD/Cedar" "v1.0" github "Quick/Nimble" "v8.1.1" github "Quick/Quick" "v2.2.1" From 42b1cd8cbc796b0c9ce5cddd973c9760a67f297e Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Wed, 3 Jun 2020 21:36:43 +0300 Subject: [PATCH 04/19] Add empty tests for MBNavigator extensions. --- .../Extensions/MBNavigatorTests.swift | 4 ++++ MapboxNavigation.xcodeproj/project.pbxproj | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 MapboxCoreNavigationTests/Extensions/MBNavigatorTests.swift diff --git a/MapboxCoreNavigationTests/Extensions/MBNavigatorTests.swift b/MapboxCoreNavigationTests/Extensions/MBNavigatorTests.swift new file mode 100644 index 00000000000..06b8b536064 --- /dev/null +++ b/MapboxCoreNavigationTests/Extensions/MBNavigatorTests.swift @@ -0,0 +1,4 @@ +import XCTest +@testable import MapboxCoreNavigation + +class MBNavigatorTests: XCTestCase {} diff --git a/MapboxNavigation.xcodeproj/project.pbxproj b/MapboxNavigation.xcodeproj/project.pbxproj index 818c5f43877..ddbaa683fbb 100644 --- a/MapboxNavigation.xcodeproj/project.pbxproj +++ b/MapboxNavigation.xcodeproj/project.pbxproj @@ -233,6 +233,7 @@ 35F520C01FB482A200FC9C37 /* NextBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F520BF1FB482A200FC9C37 /* NextBannerView.swift */; }; 35F611C41F1E1C0500C43249 /* FeedbackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F611C31F1E1C0500C43249 /* FeedbackViewController.swift */; }; 35F9BC2F2296FCD300364A10 /* 9-legged-route.json in Resources */ = {isa = PBXBuildFile; fileRef = 35F9BAD12296FCD200364A10 /* 9-legged-route.json */; }; + 3A163AE0249901C300D66A0D /* MBNavigatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A163ADF249901C300D66A0D /* MBNavigatorTests.swift */; }; 3EA9301B03F8679BEDD4795F /* Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA93A10227A7DAF1861D9F5 /* Cache.swift */; }; 3EA9369C33A8F10DAE9043AA /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA934C5D8DBAA19DB0F5271 /* ImageDownloader.swift */; }; 3EA9371104016CD402547F1A /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA938479CF48D7AD1B6369B /* ImageCache.swift */; }; @@ -841,6 +842,7 @@ 35F520BF1FB482A200FC9C37 /* NextBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NextBannerView.swift; sourceTree = ""; }; 35F611C31F1E1C0500C43249 /* FeedbackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedbackViewController.swift; sourceTree = ""; }; 35F9BAD12296FCD200364A10 /* 9-legged-route.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "9-legged-route.json"; sourceTree = ""; }; + 3A163ADF249901C300D66A0D /* MBNavigatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MBNavigatorTests.swift; sourceTree = ""; }; 3EA93170CB959F3065ACFFC3 /* SpeechAPISpy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeechAPISpy.swift; sourceTree = ""; }; 3EA93230997B8D59E3B76C8C /* InstructionPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InstructionPresenter.swift; sourceTree = ""; }; 3EA934C5D8DBAA19DB0F5271 /* ImageDownloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageDownloader.swift; sourceTree = ""; }; @@ -1544,6 +1546,14 @@ path = TestHelper; sourceTree = ""; }; + 3A163AE1249901D000D66A0D /* Extensions */ = { + isa = PBXGroup; + children = ( + 3A163ADF249901C300D66A0D /* MBNavigatorTests.swift */, + ); + path = Extensions; + sourceTree = ""; + }; 8DCB4246218A53F500D6FCAD /* Protocols */ = { isa = PBXGroup; children = ( @@ -1792,6 +1802,7 @@ C5ADFBD61DDCC7840011824B /* MapboxCoreNavigationTests */ = { isa = PBXGroup; children = ( + 3A163AE1249901D000D66A0D /* Extensions */, C52D09CF1DEF5E5F00BE3C5C /* Fixtures */, C5BF7371206AB0DF00CDBB6D /* CLHeadingPrivate.h */, DAD903AE23E3DCC80057CF1F /* DateTests.swift */, @@ -2800,6 +2811,7 @@ 352762A4225B751A0015B632 /* OptionsTests.swift in Sources */, 8DB7EF6A2176674800DA83A3 /* MapboxNavigationServiceSpec.swift in Sources */, 35EF782A212C324E001B4BB5 /* TunnelAuthorityTests.swift in Sources */, + 3A163AE0249901C300D66A0D /* MBNavigatorTests.swift in Sources */, C5ABB50E20408D2C00AFA92C /* NavigationServiceTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; From 40d70701beb99b0b31c87359048cecfe6546c073 Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Wed, 3 Jun 2020 21:40:01 +0300 Subject: [PATCH 05/19] Move FixLocation extension into a separate file. --- MapboxCoreNavigation/FixLocation.swift | 15 +++++++++++++++ MapboxCoreNavigation/MBNavigator.swift | 13 ------------- MapboxNavigation.xcodeproj/project.pbxproj | 4 ++++ 3 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 MapboxCoreNavigation/FixLocation.swift diff --git a/MapboxCoreNavigation/FixLocation.swift b/MapboxCoreNavigation/FixLocation.swift new file mode 100644 index 00000000000..ab0364c7a72 --- /dev/null +++ b/MapboxCoreNavigation/FixLocation.swift @@ -0,0 +1,15 @@ +import CoreLocation +import Foundation +import MapboxNavigationNative + +extension FixLocation { + convenience init(_ location: CLLocation) { + self.init(coordinate: location.coordinate, + time: location.timestamp, + speed: location.speed >= 0 ? location.speed as NSNumber : nil, + bearing: location.course >= 0 ? location.course as NSNumber : nil, + altitude: location.altitude as NSNumber, + accuracyHorizontal: location.horizontalAccuracy >= 0 ? location.horizontalAccuracy as NSNumber : nil, + provider: nil) + } +} diff --git a/MapboxCoreNavigation/MBNavigator.swift b/MapboxCoreNavigation/MBNavigator.swift index faa185f1fc1..3a8399ab22d 100644 --- a/MapboxCoreNavigation/MBNavigator.swift +++ b/MapboxCoreNavigation/MBNavigator.swift @@ -1,18 +1,5 @@ import Foundation import MapboxNavigationNative -import CoreLocation - -extension FixLocation { - convenience init(_ location: CLLocation) { - self.init(coordinate: location.coordinate, - time: location.timestamp, - speed: location.speed >= 0 ? location.speed as NSNumber : nil, - bearing: location.course >= 0 ? location.course as NSNumber : nil, - altitude: location.altitude as NSNumber, - accuracyHorizontal: location.horizontalAccuracy >= 0 ? location.horizontalAccuracy as NSNumber : nil, - provider: nil) - } -} /// :nodoc: extension RouteState: CustomStringConvertible { diff --git a/MapboxNavigation.xcodeproj/project.pbxproj b/MapboxNavigation.xcodeproj/project.pbxproj index ddbaa683fbb..c784490a920 100644 --- a/MapboxNavigation.xcodeproj/project.pbxproj +++ b/MapboxNavigation.xcodeproj/project.pbxproj @@ -234,6 +234,7 @@ 35F611C41F1E1C0500C43249 /* FeedbackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F611C31F1E1C0500C43249 /* FeedbackViewController.swift */; }; 35F9BC2F2296FCD300364A10 /* 9-legged-route.json in Resources */ = {isa = PBXBuildFile; fileRef = 35F9BAD12296FCD200364A10 /* 9-legged-route.json */; }; 3A163AE0249901C300D66A0D /* MBNavigatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A163ADF249901C300D66A0D /* MBNavigatorTests.swift */; }; + 3A163AE3249901D000D66A0D /* FixLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A163AE2249901D000D66A0D /* FixLocation.swift */; }; 3EA9301B03F8679BEDD4795F /* Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA93A10227A7DAF1861D9F5 /* Cache.swift */; }; 3EA9369C33A8F10DAE9043AA /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA934C5D8DBAA19DB0F5271 /* ImageDownloader.swift */; }; 3EA9371104016CD402547F1A /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA938479CF48D7AD1B6369B /* ImageCache.swift */; }; @@ -843,6 +844,7 @@ 35F611C31F1E1C0500C43249 /* FeedbackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedbackViewController.swift; sourceTree = ""; }; 35F9BAD12296FCD200364A10 /* 9-legged-route.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "9-legged-route.json"; sourceTree = ""; }; 3A163ADF249901C300D66A0D /* MBNavigatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MBNavigatorTests.swift; sourceTree = ""; }; + 3A163AE2249901D000D66A0D /* FixLocation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FixLocation.swift; sourceTree = ""; }; 3EA93170CB959F3065ACFFC3 /* SpeechAPISpy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeechAPISpy.swift; sourceTree = ""; }; 3EA93230997B8D59E3B76C8C /* InstructionPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InstructionPresenter.swift; sourceTree = ""; }; 3EA934C5D8DBAA19DB0F5271 /* ImageDownloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageDownloader.swift; sourceTree = ""; }; @@ -1721,6 +1723,7 @@ 35A5413A1EFC052700E49846 /* RouteOptions.swift */, C57491DE1FACC42F006F97BC /* CGPoint.swift */, C582FD5E203626E900A9086E /* CLLocationDirection.swift */, + 3A163AE2249901D000D66A0D /* FixLocation.swift */, 35C98732212E037900808B82 /* MBNavigator.swift */, 35A43F76223BD632000CB367 /* RouteLeg.swift */, 35F3387B2232AEBF0071DB5C /* MinimumEditDistance.swift */, @@ -2778,6 +2781,7 @@ C5D9800F1EFBCDAD006DBF2E /* Date.swift in Sources */, 35A43F77223BD632000CB367 /* RouteLeg.swift in Sources */, 4303A3992332CD6200B5737D /* UnimplementedLogging.swift in Sources */, + 3A163AE3249901D000D66A0D /* FixLocation.swift in Sources */, 8D2AA745211CDD4000EB7F72 /* NavigationService.swift in Sources */, 35A5413B1EFC052700E49846 /* RouteOptions.swift in Sources */, 353E69041EF0C4E5007B2AE5 /* SimulatedLocationManager.swift in Sources */, From 0b95a884a27511587c513d3aab90eb883e135baf Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Wed, 3 Jun 2020 21:41:17 +0300 Subject: [PATCH 06/19] Rename MBNavigation.swift file with an extension to RouteState.swift according to its type name. --- .../{MBNavigator.swift => RouteState.swift} | 0 MapboxNavigation.xcodeproj/project.pbxproj | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) rename MapboxCoreNavigation/{MBNavigator.swift => RouteState.swift} (100%) diff --git a/MapboxCoreNavigation/MBNavigator.swift b/MapboxCoreNavigation/RouteState.swift similarity index 100% rename from MapboxCoreNavigation/MBNavigator.swift rename to MapboxCoreNavigation/RouteState.swift diff --git a/MapboxNavigation.xcodeproj/project.pbxproj b/MapboxNavigation.xcodeproj/project.pbxproj index c784490a920..1d4a72d31eb 100644 --- a/MapboxNavigation.xcodeproj/project.pbxproj +++ b/MapboxNavigation.xcodeproj/project.pbxproj @@ -165,7 +165,7 @@ 35C8DC162191E5D50053328C /* NavigationEventsManagerTestDoubles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16120A4C20645D6E007EA21D /* NavigationEventsManagerTestDoubles.swift */; }; 35C8DC172191E5DB0053328C /* NavigationServiceTestDoubles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA93EBD6E6BEC966BBE51D6 /* NavigationServiceTestDoubles.swift */; }; 35C98731212E02B500808B82 /* RouteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35C98730212E02B500808B82 /* RouteController.swift */; }; - 35C98733212E037900808B82 /* MBNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35C98732212E037900808B82 /* MBNavigator.swift */; }; + 35C98733212E037900808B82 /* RouteState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35C98732212E037900808B82 /* RouteState.swift */; }; 35C98735212E042C00808B82 /* MapboxNavigationNative.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35C98734212E042C00808B82 /* MapboxNavigationNative.framework */; }; 35C98736212E045200808B82 /* MapboxNavigationNative.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35C98734212E042C00808B82 /* MapboxNavigationNative.framework */; }; 35C98738212E045300808B82 /* MapboxNavigationNative.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35C98734212E042C00808B82 /* MapboxNavigationNative.framework */; }; @@ -792,7 +792,7 @@ 35C8DC0E2191DE940053328C /* DCA-Arboretum.trace.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "DCA-Arboretum.trace.json"; sourceTree = ""; }; 35C8DC102191E1140053328C /* DirectionsSpy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectionsSpy.swift; sourceTree = ""; }; 35C98730212E02B500808B82 /* RouteController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouteController.swift; sourceTree = ""; }; - 35C98732212E037900808B82 /* MBNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MBNavigator.swift; sourceTree = ""; }; + 35C98732212E037900808B82 /* RouteState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouteState.swift; sourceTree = ""; }; 35C98734212E042C00808B82 /* MapboxNavigationNative.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapboxNavigationNative.framework; path = Carthage/Build/iOS/MapboxNavigationNative.framework; sourceTree = ""; }; 35C9973E1E732C1B00544D1C /* RouteVoiceController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteVoiceController.swift; sourceTree = ""; }; 35CB1E121F97DD740011CC44 /* FeedbackItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedbackItem.swift; sourceTree = ""; }; @@ -1724,7 +1724,7 @@ C57491DE1FACC42F006F97BC /* CGPoint.swift */, C582FD5E203626E900A9086E /* CLLocationDirection.swift */, 3A163AE2249901D000D66A0D /* FixLocation.swift */, - 35C98732212E037900808B82 /* MBNavigator.swift */, + 35C98732212E037900808B82 /* RouteState.swift */, 35A43F76223BD632000CB367 /* RouteLeg.swift */, 35F3387B2232AEBF0071DB5C /* MinimumEditDistance.swift */, DA754E1623AC56E5007E16B5 /* MBXAccounts+CoreNavigationAdditions.h */, @@ -2759,7 +2759,7 @@ 8D1A5CD2212DDFCD0059BA4A /* DispatchTimer.swift in Sources */, C561735B1F182113005954F6 /* RouteStep.swift in Sources */, 354A9BC620EA991900F03325 /* SessionState.swift in Sources */, - 35C98733212E037900808B82 /* MBNavigator.swift in Sources */, + 35C98733212E037900808B82 /* RouteState.swift in Sources */, C582FD5F203626E900A9086E /* CLLocationDirection.swift in Sources */, 3582A25220EFA9680029C5DE /* RouterDelegate.swift in Sources */, 353E68FC1EF0B7F8007B2AE5 /* NavigationLocationManager.swift in Sources */, From a2b6c0aba1b1759542e0c2d7a4c6a0f564bf53c7 Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Wed, 3 Jun 2020 21:43:14 +0300 Subject: [PATCH 07/19] Sort Extension within group alphabetically. --- MapboxNavigation.xcodeproj/project.pbxproj | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MapboxNavigation.xcodeproj/project.pbxproj b/MapboxNavigation.xcodeproj/project.pbxproj index 1d4a72d31eb..588848e3039 100644 --- a/MapboxNavigation.xcodeproj/project.pbxproj +++ b/MapboxNavigation.xcodeproj/project.pbxproj @@ -1714,19 +1714,19 @@ isa = PBXGroup; children = ( 353E68FD1EF0B985007B2AE5 /* BundleAdditions.swift */, + C57491DE1FACC42F006F97BC /* CGPoint.swift */, 359574A71F28CC3800838209 /* CLLocation.swift */, + C582FD5E203626E900A9086E /* CLLocationDirection.swift */, C5D9800E1EFBCDAD006DBF2E /* Date.swift */, + 3A163AE2249901D000D66A0D /* FixLocation.swift */, C51DF8651F38C31C006C6A15 /* Locale.swift */, + 35F3387B2232AEBF0071DB5C /* MinimumEditDistance.swift */, C578DA071EFD0FFF0052079F /* ProcessInfo.swift */, - C561735A1F182113005954F6 /* RouteStep.swift */, - 351927351F0FA072003A702D /* ScreenCapture.swift */, + 35A43F76223BD632000CB367 /* RouteLeg.swift */, 35A5413A1EFC052700E49846 /* RouteOptions.swift */, - C57491DE1FACC42F006F97BC /* CGPoint.swift */, - C582FD5E203626E900A9086E /* CLLocationDirection.swift */, - 3A163AE2249901D000D66A0D /* FixLocation.swift */, 35C98732212E037900808B82 /* RouteState.swift */, - 35A43F76223BD632000CB367 /* RouteLeg.swift */, - 35F3387B2232AEBF0071DB5C /* MinimumEditDistance.swift */, + C561735A1F182113005954F6 /* RouteStep.swift */, + 351927351F0FA072003A702D /* ScreenCapture.swift */, DA754E1623AC56E5007E16B5 /* MBXAccounts+CoreNavigationAdditions.h */, DA754E1723AC56E5007E16B5 /* MBXAccounts+CoreNavigationAdditions.m */, ); From b63e6f9a136b9d0161ed5339848c428fe16ad8ce Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Wed, 3 Jun 2020 21:44:06 +0300 Subject: [PATCH 08/19] Rename MBNavigatorTests.swift to RouteStateTests.swift. --- .../{MBNavigatorTests.swift => RouteStateTests.swift} | 2 +- MapboxNavigation.xcodeproj/project.pbxproj | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename MapboxCoreNavigationTests/Extensions/{MBNavigatorTests.swift => RouteStateTests.swift} (58%) diff --git a/MapboxCoreNavigationTests/Extensions/MBNavigatorTests.swift b/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift similarity index 58% rename from MapboxCoreNavigationTests/Extensions/MBNavigatorTests.swift rename to MapboxCoreNavigationTests/Extensions/RouteStateTests.swift index 06b8b536064..cd398922037 100644 --- a/MapboxCoreNavigationTests/Extensions/MBNavigatorTests.swift +++ b/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift @@ -1,4 +1,4 @@ import XCTest @testable import MapboxCoreNavigation -class MBNavigatorTests: XCTestCase {} +class RouteStateTests: XCTestCase {} diff --git a/MapboxNavigation.xcodeproj/project.pbxproj b/MapboxNavigation.xcodeproj/project.pbxproj index 588848e3039..96bc9b1111d 100644 --- a/MapboxNavigation.xcodeproj/project.pbxproj +++ b/MapboxNavigation.xcodeproj/project.pbxproj @@ -233,7 +233,7 @@ 35F520C01FB482A200FC9C37 /* NextBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F520BF1FB482A200FC9C37 /* NextBannerView.swift */; }; 35F611C41F1E1C0500C43249 /* FeedbackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F611C31F1E1C0500C43249 /* FeedbackViewController.swift */; }; 35F9BC2F2296FCD300364A10 /* 9-legged-route.json in Resources */ = {isa = PBXBuildFile; fileRef = 35F9BAD12296FCD200364A10 /* 9-legged-route.json */; }; - 3A163AE0249901C300D66A0D /* MBNavigatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A163ADF249901C300D66A0D /* MBNavigatorTests.swift */; }; + 3A163AE0249901C300D66A0D /* RouteStateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A163ADF249901C300D66A0D /* RouteStateTests.swift */; }; 3A163AE3249901D000D66A0D /* FixLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A163AE2249901D000D66A0D /* FixLocation.swift */; }; 3EA9301B03F8679BEDD4795F /* Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA93A10227A7DAF1861D9F5 /* Cache.swift */; }; 3EA9369C33A8F10DAE9043AA /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA934C5D8DBAA19DB0F5271 /* ImageDownloader.swift */; }; @@ -843,7 +843,7 @@ 35F520BF1FB482A200FC9C37 /* NextBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NextBannerView.swift; sourceTree = ""; }; 35F611C31F1E1C0500C43249 /* FeedbackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedbackViewController.swift; sourceTree = ""; }; 35F9BAD12296FCD200364A10 /* 9-legged-route.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "9-legged-route.json"; sourceTree = ""; }; - 3A163ADF249901C300D66A0D /* MBNavigatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MBNavigatorTests.swift; sourceTree = ""; }; + 3A163ADF249901C300D66A0D /* RouteStateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouteStateTests.swift; sourceTree = ""; }; 3A163AE2249901D000D66A0D /* FixLocation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FixLocation.swift; sourceTree = ""; }; 3EA93170CB959F3065ACFFC3 /* SpeechAPISpy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpeechAPISpy.swift; sourceTree = ""; }; 3EA93230997B8D59E3B76C8C /* InstructionPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InstructionPresenter.swift; sourceTree = ""; }; @@ -1551,7 +1551,7 @@ 3A163AE1249901D000D66A0D /* Extensions */ = { isa = PBXGroup; children = ( - 3A163ADF249901C300D66A0D /* MBNavigatorTests.swift */, + 3A163ADF249901C300D66A0D /* RouteStateTests.swift */, ); path = Extensions; sourceTree = ""; @@ -2815,7 +2815,7 @@ 352762A4225B751A0015B632 /* OptionsTests.swift in Sources */, 8DB7EF6A2176674800DA83A3 /* MapboxNavigationServiceSpec.swift in Sources */, 35EF782A212C324E001B4BB5 /* TunnelAuthorityTests.swift in Sources */, - 3A163AE0249901C300D66A0D /* MBNavigatorTests.swift in Sources */, + 3A163AE0249901C300D66A0D /* RouteStateTests.swift in Sources */, C5ABB50E20408D2C00AFA92C /* NavigationServiceTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; From e947fe1d278d7a954613cf57f825b167806c40c3 Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Wed, 3 Jun 2020 21:59:11 +0300 Subject: [PATCH 09/19] Update RouteStateTests. --- .../Extensions/RouteStateTests.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift b/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift index cd398922037..d77810c16f5 100644 --- a/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift +++ b/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift @@ -1,4 +1,15 @@ import XCTest +@testable import MapboxNavigationNative @testable import MapboxCoreNavigation -class RouteStateTests: XCTestCase {} +class RouteStateTests: XCTestCase { + func testDescriptionPropertyReturnsExpectedValue() { + XCTAssertEqual(RouteState.invalid.description, "invalid") + XCTAssertEqual(RouteState.initialized.description, "initialized") + XCTAssertEqual(RouteState.tracking.description, "tracking") + XCTAssertEqual(RouteState.complete.description, "complete") + XCTAssertEqual(RouteState.offRoute.description, "invaoffRoutelid") + XCTAssertEqual(RouteState.stale.description, "stale") + XCTAssertEqual(RouteState.uncertain.description, "uncertain") + } +} From 8169a7a6ea1ae3323c3dc0a39ab0f4d6c3ed2cb5 Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Thu, 4 Jun 2020 10:48:28 +0300 Subject: [PATCH 10/19] Update Podspec file and Podfile.lock. --- MapboxCoreNavigation.podspec | 2 +- .../PodInstall/PodInstall.xcodeproj/project.pbxproj | 6 ++---- .../CocoaPodsTest/PodInstall/Podfile.lock | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/MapboxCoreNavigation.podspec b/MapboxCoreNavigation.podspec index f890ca8bb2f..86592929167 100644 --- a/MapboxCoreNavigation.podspec +++ b/MapboxCoreNavigation.podspec @@ -40,7 +40,7 @@ Pod::Spec.new do |s| s.requires_arc = true s.module_name = "MapboxCoreNavigation" - s.dependency "MapboxNavigationNative", "= 9.0.4" + s.dependency "MapboxNavigationNative", "= 9.2.1" s.dependency "MapboxAccounts", "~> 2.3.0" s.dependency "MapboxDirections", "~> 0.32.0" s.dependency "MapboxMobileEvents", "~> 0.10.2" # Always pin to a patch release if pre-1.0 diff --git a/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/PodInstall.xcodeproj/project.pbxproj b/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/PodInstall.xcodeproj/project.pbxproj index ef1df53e472..a0e04a41633 100644 --- a/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/PodInstall.xcodeproj/project.pbxproj +++ b/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/PodInstall.xcodeproj/project.pbxproj @@ -244,8 +244,7 @@ "${BUILT_PRODUCTS_DIR}/MapboxNavigation/MapboxNavigation.framework", "${PODS_ROOT}/MapboxNavigationNative/MapboxNavigationNative.framework", "${PODS_ROOT}/MapboxNavigationNative/MapboxNavigationNative.framework.dSYM", - "${PODS_ROOT}/MapboxNavigationNative/A8E27795-23A6-3C82-9BA8-2C7578AC7E97.bcsymbolmap", - "${PODS_ROOT}/MapboxNavigationNative/FD2B23C2-808F-3297-B5E8-B3D024CB9C70.bcsymbolmap", + "${PODS_ROOT}/MapboxNavigationNative/9E1DC337-5279-3C31-9D5D-D8BA2ECDEB2C.bcsymbolmap", "${BUILT_PRODUCTS_DIR}/MapboxSpeech/MapboxSpeech.framework", "${BUILT_PRODUCTS_DIR}/Polyline/Polyline.framework", "${BUILT_PRODUCTS_DIR}/Solar/Solar.framework", @@ -266,8 +265,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxNavigation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxNavigationNative.framework", "${DWARF_DSYM_FOLDER_PATH}/MapboxNavigationNative.framework.dSYM", - "${BUILT_PRODUCTS_DIR}/A8E27795-23A6-3C82-9BA8-2C7578AC7E97.bcsymbolmap", - "${BUILT_PRODUCTS_DIR}/FD2B23C2-808F-3297-B5E8-B3D024CB9C70.bcsymbolmap", + "${BUILT_PRODUCTS_DIR}/9E1DC337-5279-3C31-9D5D-D8BA2ECDEB2C.bcsymbolmap", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxSpeech.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Polyline.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Solar.framework", diff --git a/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/Podfile.lock b/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/Podfile.lock index 3f5f0dc6f89..6aa1d9cba09 100644 --- a/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/Podfile.lock +++ b/MapboxCoreNavigationTests/CocoaPodsTest/PodInstall/Podfile.lock @@ -6,7 +6,7 @@ PODS: - MapboxAccounts (~> 2.3.0) - MapboxDirections (~> 0.32.0) - MapboxMobileEvents (~> 0.10.2) - - MapboxNavigationNative (= 9.0.4) + - MapboxNavigationNative (= 9.2.1) - Turf (~> 0.5.0) - MapboxDirections (0.32.0): - Polyline (~> 4.2) @@ -18,7 +18,7 @@ PODS: - MapboxMobileEvents (~> 0.10.2) - MapboxSpeech (~> 0.3.0) - Solar (~> 2.1) - - MapboxNavigationNative (9.0.4) + - MapboxNavigationNative (9.2.1) - MapboxSpeech (0.3.0) - Polyline (4.2.1) - Solar (2.1.0) @@ -49,11 +49,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Mapbox-iOS-SDK: a5915700ec84bc1a7f8b3e746d474789e35b7956 MapboxAccounts: 84abfdde95d9dc483f604c1b0fe1861edf691ce7 - MapboxCoreNavigation: ddd42a0c92935d7d6090fdccd63fc8c84e5dbf8b + MapboxCoreNavigation: 3aab7ff9c1d56f0da6c2f8656162e90e918ba281 MapboxDirections: 7f36b3e9ef6a53fc997c114a341ab4da721756bd MapboxMobileEvents: 2bc0ca2eedb627b73cf403258dce2b2fa98074a6 MapboxNavigation: 42bae50b0381dce317c85884ba0de38fc68a4814 - MapboxNavigationNative: 50436c659f40d7f67ed8a60652c9d344f0e10e27 + MapboxNavigationNative: 97104806edeb30c77f96f81a255999a4d52f5451 MapboxSpeech: 403415e932e084cf290b9d55c49ab7ea210b9595 Polyline: 0e9890790292741c8186201a536b6bb6a78d02dd Solar: 2dc6e7cc39186cb0c8228fa08df76fb50c7d8f24 From 56a47831df98c87328a925bd46262f445b15e179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Wed, 17 Jun 2020 00:09:57 -0700 Subject: [PATCH 11/19] Updated changelog --- CHANGELOG.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 726c27b0bba..583c85a761d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,25 +2,35 @@ ## master -### MAU Billing +### Packaging * Enabled MAU billing by default, so that SDKs usage of Mapbox APIs is [billed](https://www.mapbox.com/pricing/) together based on [monthly active users](https://docs.mapbox.com/help/glossary/monthly-active-users/) rather than individually by HTTP request. If you prefer to still use request-based billing, set the `MBXNavigationBillingMethod` key in Info.plist to `request` ([#2405](https://github.com/mapbox/mapbox-navigation-ios/pull/2405). +* Added a Greek localization. ([#2385](https://github.com/mapbox/mapbox-navigation-ios/pull/2385)) + +### User location + +* Fixed issues where the user puck would sometimes drift away from the route line even though the user was following the route. ([#2404](https://github.com/mapbox/mapbox-navigation-ios/pull/2404)) +* Fixed an issue where `RouteController` took longer than usual to detect that the user had gone off-route. ([#2404](https://github.com/mapbox/mapbox-navigation-ios/pull/2404)) +* Fixed an issue where `RouteController` would detect that the user had gone off-route due to a single errant location update. ([#2404](https://github.com/mapbox/mapbox-navigation-ios/pull/2404)) ### Offline navigation * Fixed a crash that occurred after setting `RouteOptions.shapeFormat` to `RouteShapeFormat.geoJSON`. ([valhalla/valhalla#1867](https://github.com/valhalla/valhalla/pull/1867)) +* Fixed an issue where some routes had unreasonably long expected travel times. ([valhalla/valhalla#2102](https://github.com/valhalla/valhalla/pull/2102)) +* Fixed incorrect routing at some intersections of divided roads where there are turn restrictions. ([valhalla/valhalla#2109](https://github.com/valhalla/valhalla/pull/2109)) * Fixed issues where routes would sometimes require divebombing. ([valhalla/valhalla#1931](https://github.com/valhalla/valhalla/pull/1931)) * Fixed an issue where the route would sometimes contain duplicate waypoints. ([valhalla/valhalla#1880](https://github.com/valhalla/valhalla/pull/1880)) +* Fixed an issue where an exception to a road closure on a public holiday was being ignored. ([valhalla/valhalla#2198](https://github.com/valhalla/valhalla/pull/2198)) +* By default, calculated routes follow alleys less often. ([valhalla/valhalla#2231](https://github.com/valhalla/valhalla/pull/2231)) * Turn lane indications are now shown below the turn banner as when navigating online. ([valhalla/valhalla#1830](https://github.com/valhalla/valhalla/pull/1830), [valhalla/valhalla#1859](https://github.com/valhalla/valhalla/pull/1859)) +* Fixed an issue where the `RouteStep.expectedTravelTime` properties of each step did not add up to the `RouteLeg.expectedTravelTime` property. ([valhalla/valhalla#2195](https://github.com/valhalla/valhalla/pull/2195)) +* Fixed an issue where a forward- or backward-only speed limit was not considered when calculating some expected travel times. ([valhalla/valhalla#2198](https://github.com/valhalla/valhalla/pull/2198)) * Suppressed extraneous fork instructions. ([valhalla/valhalla#1886](https://github.com/valhalla/valhalla/pull/1886), [valhalla/valhalla#1909](https://github.com/valhalla/valhalla/pull/1909), [valhalla/valhalla#1928](https://github.com/valhalla/valhalla/pull/1928)) * Merge instructions now indicate whether to merge to the left or the right, as when navigating online. ([valhalla/valhalla#1892](https://github.com/valhalla/valhalla/pull/1892), [valhalla/valhalla#1989](https://github.com/valhalla/valhalla/pull/1989)) +* Fixed ungrammatical spoken instructions at sharp turns in English. ([valhalla/valhalla#2226](https://github.com/valhalla/valhalla/pull/2226)) * Fixed an issue where spoken and visual instructions sometimes omitted the cardinal direction after a route number in the United States. ([valhalla/valhalla#1917](https://github.com/valhalla/valhalla/pull/1917)) * A spoken instruction about an exit ramp no longer specifies the side of the road if the ramp branches off the slow lane (on the right side in regions that drive on the right). ([valhalla/valhalla#1990](https://github.com/valhalla/valhalla/pull/1990)) -### Other changes - -* Added a Greek localization. ([#2385](https://github.com/mapbox/mapbox-navigation-ios/pull/2385)) - ## v0.40.0 ### Packaging From e1b69605d10ea0c76017bccfcee2d66d378dfa65 Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Wed, 17 Jun 2020 10:36:44 +0300 Subject: [PATCH 12/19] Use ~> operator instead of == for MapboxNavNative in the list of dependencies. --- Cartfile | 2 +- MapboxCoreNavigation.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile b/Cartfile index 9c1104fe3e1..9c8d5c5585a 100644 --- a/Cartfile +++ b/Cartfile @@ -1,6 +1,6 @@ binary "https://www.mapbox.com/ios-sdk/MapboxAccounts.json" ~> 2.3 binary "https://mapbox-gl-native-ios.s3.amazonaws.com/public/internal/Mapbox-iOS-SDK.json" == 5.9.1000 -binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" == 9.2.1 +binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" ~> 9.2.1 github "mapbox/mapbox-directions-swift" ~> 0.32 github "mapbox/turf-swift" ~> 0.5 github "mapbox/mapbox-events-ios" ~> 0.10 diff --git a/MapboxCoreNavigation.podspec b/MapboxCoreNavigation.podspec index 86592929167..5b785054cd1 100644 --- a/MapboxCoreNavigation.podspec +++ b/MapboxCoreNavigation.podspec @@ -40,7 +40,7 @@ Pod::Spec.new do |s| s.requires_arc = true s.module_name = "MapboxCoreNavigation" - s.dependency "MapboxNavigationNative", "= 9.2.1" + s.dependency "MapboxNavigationNative", "~> 9.2.1" s.dependency "MapboxAccounts", "~> 2.3.0" s.dependency "MapboxDirections", "~> 0.32.0" s.dependency "MapboxMobileEvents", "~> 0.10.2" # Always pin to a patch release if pre-1.0 From 55bfbd3cbf899ef60d8904d9f472977a6dcfa8cc Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Wed, 17 Jun 2020 10:39:02 +0300 Subject: [PATCH 13/19] Fix typo in RouteStateTests.swift. --- MapboxCoreNavigationTests/Extensions/RouteStateTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift b/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift index d77810c16f5..eeecceb2741 100644 --- a/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift +++ b/MapboxCoreNavigationTests/Extensions/RouteStateTests.swift @@ -8,7 +8,7 @@ class RouteStateTests: XCTestCase { XCTAssertEqual(RouteState.initialized.description, "initialized") XCTAssertEqual(RouteState.tracking.description, "tracking") XCTAssertEqual(RouteState.complete.description, "complete") - XCTAssertEqual(RouteState.offRoute.description, "invaoffRoutelid") + XCTAssertEqual(RouteState.offRoute.description, "offRoute") XCTAssertEqual(RouteState.stale.description, "stale") XCTAssertEqual(RouteState.uncertain.description, "uncertain") } From 5406cdd3ee841f7c631462c9e56f7304c50dfb87 Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Thu, 18 Jun 2020 16:58:07 +0300 Subject: [PATCH 14/19] Update CircleCI config to use public version of carthage (v0.35.0). --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5661e7b7e45..16c7149582e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,8 +41,7 @@ step-library: name: Prepare command: | echo "foo" > ~/.mapbox - brew unlink carthage - brew install carthage --HEAD + brew install carthage echo "machine dl.bintray.com" > ~/.netrc echo "login $BINTRAY_LOGIN" >> ~/.netrc echo "password $BINTRAY_API_KEY" >> ~/.netrc From a5b418fb58f6192614839c332e275eae7b2053e9 Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Mon, 22 Jun 2020 19:44:24 +0300 Subject: [PATCH 15/19] Fetch latest Carthage version from homebrew. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 16c7149582e..4941e73a603 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,7 +41,7 @@ step-library: name: Prepare command: | echo "foo" > ~/.mapbox - brew install carthage + brew update && brew install carthage echo "machine dl.bintray.com" > ~/.netrc echo "login $BINTRAY_LOGIN" >> ~/.netrc echo "password $BINTRAY_API_KEY" >> ~/.netrc From 17e903a0995d7d44a311eca44e87f0ef17ea8a01 Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Mon, 22 Jun 2020 19:48:53 +0300 Subject: [PATCH 16/19] Use .netrc to fetch pods. --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4941e73a603..f7fb8a21486 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,6 +85,7 @@ jobs: HOMEBREW_NO_AUTO_UPDATE: 1 steps: - checkout + - *prepare - *restore-cache-podmaster - *restore-cache-cocoapods - when: From c6d5109d7c0fc527dc6412d82614ea34904b9547 Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Mon, 22 Jun 2020 22:18:01 +0300 Subject: [PATCH 17/19] Update Cicrle CI config: update scripts to upgrade carthage via brew. --- .circleci/config.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f7fb8a21486..3dc1e33a601 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,16 +36,26 @@ step-library: paths: - "~/.cocoapods/repos/master" - - &prepare + - &prepare-mapbox-file run: - name: Prepare + name: Prepare .mapbox file command: | echo "foo" > ~/.mapbox - brew update && brew install carthage + + - &prepare-netrc-file + run: + name: Prepare .netrc file + command: | echo "machine dl.bintray.com" > ~/.netrc echo "login $BINTRAY_LOGIN" >> ~/.netrc echo "password $BINTRAY_API_KEY" >> ~/.netrc + - &update-carthage-version + run: + name: Update Carthage version + command: | + brew update && brew upgrade carthage + - &verify-missing-localizable-strings run: name: Verify missing localizable strings @@ -85,7 +95,9 @@ jobs: HOMEBREW_NO_AUTO_UPDATE: 1 steps: - checkout - - *prepare + - *prepare-mapbox-file + - *prepare-netrc-file + - *update-carthage-version - *restore-cache-podmaster - *restore-cache-cocoapods - when: @@ -131,7 +143,9 @@ jobs: HOMEBREW_NO_AUTO_UPDATE: 1 steps: - checkout - - *prepare + - *prepare-mapbox-file + - *prepare-netrc-file + - *update-carthage-version - *restore-cache - when: condition: << parameters.delete_private_deps >> @@ -168,7 +182,9 @@ jobs: HOMEBREW_NO_AUTO_UPDATE: 1 steps: - checkout - - *prepare + - *prepare-mapbox-file + - *prepare-netrc-file + - *update-carthage-version - *restore-cache - *install-dependencies - *build-Example From b5f6b9d6ead650e6e68f5ffbcead3d7a45a4a78c Mon Sep 17 00:00:00 2001 From: Dersim Davaod Date: Mon, 22 Jun 2020 22:39:02 +0300 Subject: [PATCH 18/19] Use carthage outdated command. --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3dc1e33a601..c8fe50468dd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,7 +66,9 @@ step-library: - &install-dependencies run: name: Install Dependencies - command: carthage bootstrap --platform ios --cache-builds --configuration Debug --no-use-binaries --use-netrc + command: | + carthage bootstrap --platform ios --cache-builds --configuration Debug --no-use-binaries --use-netrc + carthage outdated --xcode-warnings # prints warnings if there are outdated carthage dependencies - &build-Example run: From 02a85466429b148c53ffbbf415e4d28bff3c536e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Mon, 22 Jun 2020 18:42:14 -0700 Subject: [PATCH 19/19] Removed testNineLeggedRouteForOutOfBounds test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test fixture’s geometry appears to have encoding issues that are throwing the navigator off and causing crashes that can’t be reproduced more organically. --- .../NavigationServiceTests.swift | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/MapboxCoreNavigationTests/NavigationServiceTests.swift b/MapboxCoreNavigationTests/NavigationServiceTests.swift index 9f30602aaf7..b133a363e3a 100644 --- a/MapboxCoreNavigationTests/NavigationServiceTests.swift +++ b/MapboxCoreNavigationTests/NavigationServiceTests.swift @@ -483,32 +483,6 @@ class NavigationServiceTests: XCTestCase { waitForExpectations(timeout: 10) } - func testNineLeggedRouteForOutOfBounds() { - let options = NavigationRouteOptions(coordinates: [ - CLLocationCoordinate2D(latitude: 46.423728, longitude: 13.593578), - CLLocationCoordinate2D(latitude: 46.339747, longitude: 13.574151), - CLLocationCoordinate2D(latitude: 46.34447, longitude: 13.57594), - CLLocationCoordinate2D(latitude: 46.37798, longitude: 13.58583), - CLLocationCoordinate2D(latitude: 46.408308, longitude: 13.605585), - CLLocationCoordinate2D(latitude: 46.420338, longitude: 13.602128), - CLLocationCoordinate2D(latitude: 46.429376, longitude: 13.614679), - CLLocationCoordinate2D(latitude: 46.435762, longitude: 13.626714), - CLLocationCoordinate2D(latitude: 46.436658, longitude: 13.639499), - CLLocationCoordinate2D(latitude: 46.43878, longitude: 13.64052), - ]) - let route = Fixture.route(from: "9-legged-route", options: options) - let directions = Directions(credentials: Fixture.credentials) - let locationManager = DummyLocationManager() - let trace = Fixture.generateTrace(for: route, speedMultiplier: 4).shiftedToPresent() - - let service = MapboxNavigationService(route: route, routeOptions: options, directions: directions, locationSource: locationManager, eventsManagerType: nil) - service.start() - - for location in trace { - service.locationManager(locationManager, didUpdateLocations: [location]) - } - } - func testUnimplementedLogging() { unimplementedTestLogs = []