Skip to content

CarPlayManager alternative Init constructor should be public #4824

@f-gonzalez

Description

@f-gonzalez

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
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions