Interface CPApplicationDelegate

  • All Superinterfaces:
    UIApplicationDelegate

    public interface CPApplicationDelegate
    extends UIApplicationDelegate
    A set of methods that are called by the @c UIApplication singleton in response to CarPlay lifecycle events. This must be implemented by the same object that serves as your application's delegate object.
    • Method Detail

      • applicationDidConnectCarInterfaceControllerToWindow

        void applicationDidConnectCarInterfaceControllerToWindow​(UIApplication application,
                                                                 CPInterfaceController interfaceController,
                                                                 CPWindow window)
        The CarPlay screen has connected and is ready to present content. Your app should create its view controller and assign it to the @c rootViewController property of this window. [@note] It is the responsibility of the delegate to maintain a reference to the interface controller beyond the scope of this method.
      • applicationDidDisconnectCarInterfaceControllerFromWindow

        void applicationDidDisconnectCarInterfaceControllerFromWindow​(UIApplication application,
                                                                      CPInterfaceController interfaceController,
                                                                      CPWindow window)
        The CarPlay screen has disconnected.
      • applicationDidSelectManeuver

        default void applicationDidSelectManeuver​(UIApplication application,
                                                  CPManeuver maneuver)
        If your application posts a @c CPManeuver while backgrounded, a notification banner may be presented to the user. If the user taps on that banner, your application will launch on the car screen and this method will be called with the maneuver the user tapped.
      • applicationDidSelectNavigationAlert

        default void applicationDidSelectNavigationAlert​(UIApplication application,
                                                         CPNavigationAlert navigationAlert)
        If your application posts a @c CPNavigationAlert while backgrounded, a notification banner may be presented to the user. If the user taps on that banner, your application will launch on the car screen and this method will be called with the alert the user tapped.