Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
### CarPlay

* Fixed an issue where an active navigation using CarPlay application with route that contains multiple legs would cause a memory leak. ([#3877](https://github.com/mapbox/mapbox-navigation-ios/pull/3877))
* Added the `CarPlayManagerDelegate.carPlayManager(_:shouldUpdateNotificationFor:with:in:)` and `CarPlayManagerDelegate.carPlayManager(_:shouldShowNotificationFor:in:)` to provide the ability to control notifications presentation while CarPlay application is in the background. ([#3828](https://github.com/mapbox/mapbox-navigation-ios/pull/3828))

### Other Changes
* During turn-by-turn navigation, incidents along the route are now refreshed periodically along with traffic congestion.
Expand Down
5 changes: 5 additions & 0 deletions Example/AppDelegate+CarPlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ class CarPlaySceneDelegate: NSObject, CPTemplateApplicationSceneDelegate {
appDelegate.carPlayManager.templateApplicationScene(templateApplicationScene,
didConnectCarInterfaceController: interfaceController,
to: window)
// NOTE: When CarPlay is connected, we check if there is an active navigation in progress and start CarPlay
// navigation as well, otherwise, CarPlay will be in passive navigation and stay out of sync with iOS app.
if appDelegate.currentAppRootViewController?.activeNavigationViewController != nil {
Comment thread
S2Ler marked this conversation as resolved.
Comment thread
S2Ler marked this conversation as resolved.
appDelegate.currentAppRootViewController?.beginCarPlayNavigation()
}
}

func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene,
Expand Down