---
title: "templateApplicationScene(_:didConnect:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cptemplateapplicationscenedelegate/templateapplicationscene(_:didconnect:)"
---

# templateApplicationScene(_:didConnect:)

Tells the delegate about the addition of a CarPlay scene to the app.

## Declaration

```swift
optional func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController)
```

## Parameters

- `templateApplicationScene`: The scene connecting to the app.
- `interfaceController`: The interface controller for managing the user interface of this scene.

## Mentioned in

Displaying Content in CarPlay

## Discussion

Discussion CarPlay calls this method when it launches your app and connects the scene. Use the interface controller to present your user interface templates. You must set the scene’s root template before returning from this method. important: Navigation apps must implement templateApplicationScene(_:didConnect:to:) instead so they can access the window where they draw their map content.

## See Also

### Responding to the Scene Life Cycle

- [templateApplicationScene(_:didConnect:to:)](carplay/cptemplateapplicationscenedelegate/templateapplicationscene(_:didconnect:to:).md)
- [templateApplicationScene(_:didDisconnectInterfaceController:)](carplay/cptemplateapplicationscenedelegate/templateapplicationscene(_:diddisconnectinterfacecontroller:).md)
- [templateApplicationScene(_:didDisconnect:from:)](carplay/cptemplateapplicationscenedelegate/templateapplicationscene(_:diddisconnect:from:).md)
