-
CarPlayManageris the main object responsible for orchestrating interactions with a Mapbox map on CarPlay.Messages declared in the
CPApplicationDelegateprotocol should be sent to this object in the containing application’s application delegate. ImplementCarPlayManagerDelegatein the containing application and assign an instance to thedelegateproperty of yourCarPlayManagerinstance.Note
It is very important you have a single
CarPlayManagerinstance at any given time. This should be managed by yourUIApplicationDelegateclass if you choose to supply youraccessTokento theCarPlayManager.eventsManagerviaNavigationEventsManagerinitializer, instead of the Info.plist.See moreImportant
CarPlayManagerview will start a Free Drive session by default when CarPlay interface is connected. You can change default behavior usingCarPlayManager.startFreeDriveAutomaticallyproperty. For more information, see the “Pricing” guide.Declaration
Swift
public class CarPlayManager : NSObjectextension CarPlayManager: CPApplicationDelegateextension CarPlayManager: CPInterfaceControllerDelegateextension CarPlayManager: CPMapTemplateDelegateextension CarPlayManager: CarPlayNavigationViewControllerDelegateextension CarPlayManager: CarPlayMapViewControllerDelegate -
CarPlayManagerDelegateis the main integration point for Mapbox CarPlay support.Implement this protocol and assign an instance to the
delegateproperty of the shared instance ofCarPlayManager.If no delegate is set, a default built-in
See moreMapboxNavigationServicewill be created and used when a trip begins.Declaration
Swift
public protocol CarPlayManagerDelegate : AnyObject, UnimplementedLogging, CarPlayManagerDelegateDeprecations -
CarPlayNavigationViewControlleris a fully-featured turn-by-turn navigation UI for CarPlay.See moreSeealso
NavigationViewControllerDeclaration
Swift
open class CarPlayNavigationViewController : UIViewController, BuildingHighlightingextension CarPlayNavigationViewController: StyleManagerDelegateextension CarPlayNavigationViewController: NavigationServiceDelegateextension CarPlayNavigationViewController: NavigationMapViewDelegateextension CarPlayNavigationViewController: CPSessionConfigurationDelegateextension CarPlayNavigationViewController: CPListTemplateDelegate -
The
See moreCarPlayNavigationViewControllerDelegateprotocol provides methods for reacting to significant events during turn-by-turn navigation withCarPlayNavigationViewController.Declaration
Swift
public protocol CarPlayNavigationViewControllerDelegate : AnyObject, UnimplementedLogging -
The activity during which a
See moreCPTemplateis displayed. This enumeration is used to distinguish between different templates during different phases of user interaction.Declaration
Swift
public enum CarPlayActivity : Int -
A control indicating the direction that the vehicle is traveling towards.
See moreDeclaration
Swift
open class CarPlayCompassView : StylableView -
CarPlayMapViewControlleris responsible for administering the Mapbox map, the interface styles and the map template buttons to display on CarPlay.See moreImportant
LoadingCarPlayMapViewControllerview will start a Free Drive session by default. You can change default behavior usingCarPlayMapViewController.startFreeDriveAutomaticallyproperty. For more information, see the “Pricing” guide.Declaration
Swift
open class CarPlayMapViewController : UIViewControllerextension CarPlayMapViewController: StyleManagerDelegateextension CarPlayMapViewController: NavigationMapViewDelegateextension CarPlayMapViewController: CPSessionConfigurationDelegate -
The
See moreCarPlayMapViewControllerDelegateprotocol provides methods for reacting to events during free-drive navigation or route previewing inCarPlayMapViewController.Declaration
Swift
public protocol CarPlayMapViewControllerDelegate : AnyObject, UnimplementedLogging -
CarPlaySearchControlleris the main object responsible for managing the search feature on CarPlay.Messages declared in the
CPApplicationDelegateprotocol should be sent to this object in the containing application’s application delegate. ImplementCarPlaySearchControllerDelegatein the containing application and assign an instance to thedelegateproperty of yourCarPlaySearchControllerinstance.See moreNote
It is very important you have a singleCarPlaySearchControllerinstance at any given time.Declaration
Swift
public class CarPlaySearchController : NSObjectextension CarPlaySearchController: CPSearchTemplateDelegateextension CarPlaySearchController: CPListTemplateDelegate -
Delegate, which is used to control behavior based on certain actions from the user when performing search on CarPlay.
See moreDeclaration
Swift
public protocol CarPlaySearchControllerDelegate : CPSearchTemplateDelegate -
The CarPlayConnectionObserver protocol provides notification of a carplay unit connecting two the NavigationViewController.
See moreDeclaration
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:
See more[RecentItem].add(_:), and removal:[RecentItem].remove(_:).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 moreDeclaration
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 withCPRouteChoiceobjects or for storing user information inCPListItem).In case if
CPRouteChoice,CPListItemor otherCarPlayUserInfodependant object uses different type inuserInfoit may lead to undefined behavior.Declaration
Swift
public typealias CarPlayUserInfo = [String : Any?]
Install in Dash
CarPlay Reference