• CarPlayManager is the main object responsible for orchestrating interactions with a Mapbox map on CarPlay.

    Messages declared in the CPApplicationDelegate protocol should be sent to this object in the containing application’s application delegate. Implement CarPlayManagerDelegate in the containing application and assign an instance to the delegate property of your CarPlayManager instance.

    Note

    It is very important you have a single CarPlayManager instance at any given time. This should be managed by your UIApplicationDelegate class if you choose to supply your accessToken to the CarPlayManager.eventsManager via NavigationEventsManager initializer, instead of the Info.plist.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public class CarPlayManager : NSObject
    extension CarPlayManager: CPApplicationDelegate
    extension CarPlayManager: CPInterfaceControllerDelegate
    extension CarPlayManager: CPMapTemplateDelegate
    extension CarPlayManager: CarPlayNavigationViewControllerDelegate
    extension CarPlayManager: CarPlayMapViewControllerDelegate
  • CarPlayManagerDelegate is the main integration point for Mapbox CarPlay support.

    Implement this protocol and assign an instance to the delegate property of the shared instance of CarPlayManager.

    If no delegate is set, a default built-in MapboxNavigationService will be created and used when a trip begins.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public protocol CarPlayManagerDelegate : AnyObject, UnimplementedLogging, CarPlayManagerDelegateDeprecations
  • CarPlayNavigationViewController is a fully-featured turn-by-turn navigation UI for CarPlay.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    open class CarPlayNavigationViewController : UIViewController, BuildingHighlighting
    extension CarPlayNavigationViewController: StyleManagerDelegate
    extension CarPlayNavigationViewController: NavigationServiceDelegate
    extension CarPlayNavigationViewController: NavigationMapViewDelegate
    extension CarPlayNavigationViewController: CPSessionConfigurationDelegate
    extension CarPlayNavigationViewController: CPListTemplateDelegate
  • The CarPlayNavigationViewControllerDelegate protocol provides methods for reacting to significant events during turn-by-turn navigation with CarPlayNavigationViewController.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public protocol CarPlayNavigationViewControllerDelegate : AnyObject, UnimplementedLogging
  • The activity during which a CPTemplate is displayed. This enumeration is used to distinguish between different templates during different phases of user interaction.

    See more

    Declaration

    Swift

    public enum CarPlayActivity : Int
  • A control indicating the direction that the vehicle is traveling towards.

    See more

    Declaration

    Swift

    open class CarPlayCompassView : StylableView
  • CarPlayMapViewController is responsible for administering the Mapbox map, the interface styles and the map template buttons to display on CarPlay.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    open class CarPlayMapViewController : UIViewController
    extension CarPlayMapViewController: StyleManagerDelegate
    extension CarPlayMapViewController: NavigationMapViewDelegate
    extension CarPlayMapViewController: CPSessionConfigurationDelegate
  • The CarPlayMapViewControllerDelegate protocol provides methods for reacting to events during free-drive navigation or route previewing in CarPlayMapViewController.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public protocol CarPlayMapViewControllerDelegate : AnyObject, UnimplementedLogging
  • CarPlaySearchController is the main object responsible for managing the search feature on CarPlay.

    Messages declared in the CPApplicationDelegate protocol should be sent to this object in the containing application’s application delegate. Implement CarPlaySearchControllerDelegate in the containing application and assign an instance to the delegate property of your CarPlaySearchController instance.

    Note

    It is very important you have a single CarPlaySearchController instance at any given time.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public class CarPlaySearchController : NSObject
    extension CarPlaySearchController: CPSearchTemplateDelegate
    extension CarPlaySearchController: CPListTemplateDelegate
  • Delegate, which is used to control behavior based on certain actions from the user when performing search on CarPlay.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public protocol CarPlaySearchControllerDelegate : CPSearchTemplateDelegate
  • The CarPlayConnectionObserver protocol provides notification of a carplay unit connecting two the NavigationViewController.

    See more

    Declaration

    Swift

    public protocol CarPlayConnectionObserver : AnyObject
  • Struct, which represents recently found search item on CarPlay. When storing recent items in an array use dedicated methods for addition: [RecentItem].add(_:), and removal: [RecentItem].remove(_:).

    See more

    Declaration

    Swift

    public struct RecentItem : Equatable, Codable
  • A struct that represents the result of a geocoding request, containing information for display to the user and locations for navigation.

    See more

    Declaration

    Swift

    public struct NavigationGeocodedPlacemark : Equatable, Codable
  • Dictionary, which contains any custom user info related data on CarPlay (for example it’s used by CPTrip, while filling it with CPRouteChoice objects or for storing user information in CPListItem).

    In case if CPRouteChoice, CPListItem or other CarPlayUserInfo dependant object uses different type in userInfo it may lead to undefined behavior.

    Declaration

    Swift

    public typealias CarPlayUserInfo = [String : Any?]