templateApplicationScene(_:didConnect:to:)
Tells the delegate about the addition of a CarPlay scene to your navigation app.
Declaration
optional func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController, to window: CPWindow)Parameters
- templateApplicationScene:
The scene connecting to the app.
- interfaceController:
The interface controller for managing the user interface of this scene.
- window:
The window where the app draws the map content.
Mentioned in
Discussion
CarPlay calls this method when it launches your navigation app and connects the scene. Create an instance of your map-drawing view controller and assign it to the window’s root view controller. Use the interface controller to present your user interface templates. You must set both the window’s root view controller and the scene’s root template before returning from this method.