Skip to content
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

Allow style customization in CarPlay #1836

Merged
merged 3 commits into from
Nov 15, 2018
Merged

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Nov 14, 2018

Applications can now customize the style of the map in CarPlay (nominally the rest of the CarPlay interface, but really just the map style).

Renamed CarPlayManager(_:) to CarPlayManager(styles:eventsManager:) and CarPlayNavigationViewController(with:mapTemplate:interfaceController:manager:styles:) to CarPlayNavigationViewController(navigationService:mapTemplate:interfaceController:manager:styles:). These initializers now accept Style objects as arguments, which are applied throughout the CarPlay interface, similar to NavigationViewController. DayStyle and NightStyle are still used by default but no longer hard-coded everywhere. The application can set CarPlayManager.styles at any time to change the map style, for example if it sets the style of NavigationViewController or a standalone NavigationMapView on the phone and needs to synchronize the change on CarPlay.

Renamed StyleManager(_:) to StyleManager(). The previous initializer looked like it gave ownership of the delegate to StyleManager, whereas it was just a weak reference. Client code is now expected to set the delegate property explicitly.

Exposed a few more CarPlayManager members to Objective-C code. Fixed some build warnings.

Fixes #1823.

/cc @mapbox/navigation-ios

@1ec5 1ec5 added build Issues related to builds and dependency management. op-ex Refactoring, Tech Debt or any other operational excellence work. feature New feature request. topic: cartography CarPlay Bugs, improvements and feature requests on Apple CarPlay labels Nov 14, 2018
@1ec5 1ec5 added this to the v0.25.0 milestone Nov 14, 2018
@1ec5 1ec5 self-assigned this Nov 14, 2018
@frederoni
Copy link
Contributor

Noticed that this build didn't trigger codecov. Would you mind trying a rebase before merging?

Renamed CarPlayManager and CarPlayNavigationViewController initializers to accept Style objects, which are applied throughout the CarPlay interface, similar to NavigationViewController. DayStyle and NightStyle are still used by default but no longer hard-coded everywhere.

Renamed the StyleManager initializer to rely on a delegate property instead of an argument that looks like it gives ownership of the delegate to StyleManager.

Exposed a few more CarPlayManager members to Objective-C code.
@1ec5 1ec5 force-pushed the 1ec5-carplay-custom-style-1823 branch from 9cb923f to b5ca519 Compare November 15, 2018 03:42
@1ec5 1ec5 merged commit a0e5dbc into master Nov 15, 2018
@1ec5 1ec5 deleted the 1ec5-carplay-custom-style-1823 branch November 15, 2018 06:51
@1ec5 1ec5 added the backwards incompatible changes that break backwards compatibility of public API label Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards incompatible changes that break backwards compatibility of public API build Issues related to builds and dependency management. CarPlay Bugs, improvements and feature requests on Apple CarPlay feature New feature request. op-ex Refactoring, Tech Debt or any other operational excellence work. topic: cartography
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants