CPTemplateApplicationScene
A CarPlay scene that controls your app’s user interface.
Declaration
class CPTemplateApplicationSceneOverview
A scene manages your app’s user interface, including the window that CarPlay displays from that scene. Only navigation apps have access to that window, and use it for drawing map content. All other categories of apps use the scene’s interface controller exclusively for constructing their user interfaces.
The scene manages the display of the window on the vehicle’s CarPlay screen, and the life cycle of that scene as CarPlay and the user interact with it. The scene notifies its delegate—an object that conforms to CPTemplateApplicationSceneDelegate—about various state changes and user actions.
You don’t create scenes directly. Instead, you specify the name of the appropriate scene 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>CPTemplateApplicationSceneSessionRoleApplication</key>
<array>
<dict>
<!-- Specify the name of the scene class. -->
<key>UISceneClassName</key>
<string>CPTemplateApplicationScene</string>
<key>UISceneConfigurationName</key>
<string>MyCarPlaySceneConfiguration</string>
<key>UISceneDelegateClassName</key>
<string>MyCarPlaySceneDelegate</string>
</dict>
</array>