CPTemplateApplicationDashboardSceneDelegate
The methods for responding to the life-cycle events of your navigation app’s dashboard scene.
Declaration
protocol CPTemplateApplicationDashboardSceneDelegate : UISceneDelegateOverview
This protocol defines methods that CarPlay calls when the scene connects and disconnects, and your implementation provides the appropriate behavior when these events occur. For example, setting the window’s root view controller when CarPlay connects your navigation app’s dashboard scene.
You don’t create instances of your dashboard scene delegate directly. Instead, you specify the name of the class as part of the CarPlay scene configuration you add to your Info.plist file—see the example below—or that you return from your app delegate’s application(_:configurationForConnecting:options:) method.
<key>CPTemplateApplicationDashboardSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>CPTemplateApplicationDashboardScene</string>
<key>UISceneConfigurationName</key>
<string>MyCarPlayDashboardSceneConfiguration</string>
<!-- Specify the name of your dashboard scene delegate class. -->
<key>UISceneDelegateClassName</key>
<string>MyCarPlayDashboardSceneDelegate</string>
</dict>
</array>