---
title: "templateApplicationScene(_:didDisconnect:from:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cptemplateapplicationscenedelegate/templateapplicationscene(_:diddisconnect:from:)"
---

# templateApplicationScene(_:didDisconnect:from:)

Tells the delegate when CarPlay removes a scene from your navigation app.

## Declaration

```swift
optional func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didDisconnect interfaceController: CPInterfaceController, from window: CPWindow)
```

## Parameters

- `templateApplicationScene`: The scene disconnecting from the app.
- `interfaceController`: The interface controller for managing the user interface of this scene.
- `window`: The window where the app draws the map content.

## Discussion

Discussion CarPlay calls this method after it disconnects the scene. You can use it to perform any cleanup. important: CarPlay calls this method exclusively for navigation apps. All other categories of apps must implement templateApplicationScene(_:didDisconnectInterfaceController:) instead.

## See Also

### Responding to the Scene Life Cycle

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