Skip to content

Make NavigationService optional to be able to skip implementation of delegate method on client side. #3208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 28, 2021

Conversation

MaximAlien
Copy link
Contributor

@MaximAlien MaximAlien commented Jul 28, 2021

Since CarPlayManager always provides default MapboxNavigationService implementation there is no need to force user to provide another instance even if it's similar to the previous one.

This is usability improvement, which was found during implementation of mapbox/mapbox-navigation-ios-examples#134.

@MaximAlien MaximAlien added the CarPlay Bugs, improvements and feature requests on Apple CarPlay label Jul 28, 2021
@MaximAlien MaximAlien added this to the v2.0.0 (GA) milestone Jul 28, 2021
@MaximAlien MaximAlien requested a review from a team July 28, 2021 00:19
@MaximAlien MaximAlien self-assigned this Jul 28, 2021
@MaximAlien MaximAlien added the UI Work related to visual components, Android Auto, Camera, 3D, voice, etc. label Jul 28, 2021
…f delegate method on client side as `CarPlayManager` provides default `MapboxNavigationService` implementation anyway.
@MaximAlien MaximAlien force-pushed the maxim/make-navigation-service-optional branch from 2a6c1b7 to 0152381 Compare July 28, 2021 20:34
@@ -84,7 +84,7 @@ public protocol CarPlayManagerDelegate: AnyObject, UnimplementedLogging {
- parameter trip: The trip that will be previewed.
- returns: The actual trip to be previewed. This can be the same trip or a new/alternate trip if desired.
*/
func carPlayManager(_ carPlayManager: CarPlayManager, willPreview trip: CPTrip) -> (CPTrip)
func carPlayManager(_ carPlayManager: CarPlayManager, willPreview trip: CPTrip) -> CPTrip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why these delegate methods return tuple. Changed signature to return object instead.

@MaximAlien MaximAlien merged commit 986003c into main Jul 28, 2021
@MaximAlien MaximAlien deleted the maxim/make-navigation-service-optional branch July 28, 2021 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CarPlay Bugs, improvements and feature requests on Apple CarPlay UI Work related to visual components, Android Auto, Camera, 3D, voice, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants