Protocol

CPApplicationDelegate

The interface for handling CarPlay life cycle events.

Declaration

protocol CPApplicationDelegate

Overview

You must implement CPApplicationDelegate on the same object that serves as the app delegate to your app.

Topics

Connecting to the CarPlay Interface

func application(UIApplication, didConnectCarInterfaceController: CPInterfaceController, to: CPWindow)

Tells the app delegate that the app connected to the CarPlay interface.

Required.

func application(UIApplication, didDisconnectCarInterfaceController: CPInterfaceController, from: CPWindow)

Tells the app delegate that the app disconnected from the CarPlay interface.

Required.

Receiving the Selected Maneuver

func application(UIApplication, didSelect: CPManeuver)

Tells the app delegate that the user selected a maneuver.

Handling Navigation Alert Actions

func application(UIApplication, didSelect: CPNavigationAlert)

Tells the app delegate that the user selected an action from a navigation alert.

Relationships

See Also

First Steps

class CPMapTemplate

Control the CarPlay display using a map template.