From ce5dbc93683c1a3681356f7802b8769a11c4789e Mon Sep 17 00:00:00 2001 From: Dmitry Volk Date: Wed, 19 Nov 2025 12:37:33 +0100 Subject: [PATCH 1/2] Do not play reroute sound before reroute --- Sources/MapboxNavigation/RouteVoiceController.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Sources/MapboxNavigation/RouteVoiceController.swift b/Sources/MapboxNavigation/RouteVoiceController.swift index 4bfc3feea6c..eb3e8f455b2 100644 --- a/Sources/MapboxNavigation/RouteVoiceController.swift +++ b/Sources/MapboxNavigation/RouteVoiceController.swift @@ -85,14 +85,12 @@ open class RouteVoiceController: NSObject, AVSpeechSynthesizerDelegate { func observeNotifications(by service: NavigationService) { NotificationCenter.default.addObserver(self, selector: #selector(didPassSpokenInstructionPoint(notification:)), name: .routeControllerDidPassSpokenInstructionPoint, object: service.router) - NotificationCenter.default.addObserver(self, selector: #selector(pauseSpeechAndPlayReroutingDing(notification:)), name: .routeControllerWillReroute, object: service.router) NotificationCenter.default.addObserver(self, selector: #selector(didReroute(notification:)), name: .routeControllerDidReroute, object: service.router) NotificationCenter.default.addObserver(self, selector: #selector(didUpdateSettings(notification:)), name: .navigationSettingsDidChange, object: nil) } func suspendNotifications() { NotificationCenter.default.removeObserver(self, name: .routeControllerDidPassSpokenInstructionPoint, object: nil) - NotificationCenter.default.removeObserver(self, name: .routeControllerWillReroute, object: nil) NotificationCenter.default.removeObserver(self, name: .routeControllerDidReroute, object: nil) NotificationCenter.default.removeObserver(self, name: .navigationSettingsDidChange, object: nil) } @@ -188,10 +186,7 @@ open class RouteVoiceController: NSObject, AVSpeechSynthesizerDelegate { public var rerouteSoundPlayer: AVAudioPlayer @objc func didReroute(notification: NSNotification) { - // Play reroute sound when a faster route is found - if notification.userInfo?[RouteController.NotificationUserInfoKey.isProactiveKey] as! Bool { - pauseSpeechAndPlayReroutingDing(notification: notification) - } + pauseSpeechAndPlayReroutingDing(notification: notification) } } From 92595e8dc7020c6f4d5ec5120ca4e02c3ad2c47c Mon Sep 17 00:00:00 2001 From: Dmitry Volk Date: Wed, 19 Nov 2025 13:15:50 +0100 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfc3e488e02..10e4a1bbb34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changes to the Mapbox Navigation SDK for iOS +## v2.20.4 + +### Other changes + +* Reroute notification sound now plays only after a new route is successfully retrieved. + ## v2.20.3 ### Routing