mapbox / mapbox/mapbox-navigation-ios
CarPlayManager alternative Init constructor should be public
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 918
- Forks
- 326
- Avg merge
- 1h 16m
- Merged PRs (30d)
- 3
Description
The CarPlayManager has 2 constructors, one public, one internal.
The internal one, has the parameter of sending a "carPlayNavigationViewControllerClass" to be able to customize the CarPlayNavigationViewController (which is already open, and has the .viewDidAppear() also open).
Why would you leave the class open and having that parameter and that constructor internal?
Following should be public: ?
```
@MainActor
init(
navigationProvider: MapboxNavigationProvider,
styles: [Style]? = nil,
carPlayNavigationViewControllerClass: CarPlayNavigationViewController.Type? = nil
) {
self.navigationProvider = navigationProvider
self.core = navigationProvider.mapboxNavigation
self.eventsManager = navigationProvider.mapboxNavigation.eventsManager()
self.styles = styles ?? [StandardDayStyle(), StandardNightStyle()]
self.mapTemplateProvider = MapTemplateProvider()
self
.carPlayNavigationViewControllerType = carPlayNavigationViewControllerClass ??
CarPlayNavigationViewController.self
super.init()
mapTemplateProvider.delegate = self
}
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at CarPlayManager and compare its two constructors, especially the internal initializer shown in the issue. Verify how the carPlayNavigationViewControllerClass customization is exposed and confirm the resulting public API can be used by callers outside the module. Done means the requested initializer is publicly accessible without removing the existing customization behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100