<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPTemplateApplicationSceneDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(pl)CPTemplateApplicationSceneDelegate"
  },
  "title" : "CPTemplateApplicationSceneDelegate"
}
-->

# CPTemplateApplicationSceneDelegate

The methods for responding to the life cycle events of your app’s scene.

```
@MainActor protocol CPTemplateApplicationSceneDelegate : UISceneDelegate
```

## Overview

This protocol defines methods that CarPlay calls when the scene connects and disconnects, as well as methods for responding to certain user actions. Use your implementation to provide the appropriate behavior for when these events occur. For example, creating and setting your root template when CarPlay launches your app and connects its scene.

You don’t create instances of your 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 <doc://com.apple.documentation/documentation/UIKit/UIApplicationDelegate/application(_:configurationForConnecting:options:)>  method.

```plist
<key>CPTemplateApplicationSceneSessionRoleApplication</key>
<array> 
    <dict>
        <key>UISceneClassName</key>
        <string>CPTemplateApplicationScene</string>
        <key>UISceneConfigurationName</key>
        <string>MyCarPlaySceneConfiguration</string>
        <!-- Specify the name of your scene delegate class. --> 
        <key>UISceneDelegateClassName</key>
        <string>MyCarPlaySceneDelegate</string> 
    </dict>
</array>
```

## Topics

### Responding to the Scene Life Cycle

[`-  templateApplicationScene:didConnectInterfaceController:`](/documentation/CarPlay/CPTemplateApplicationSceneDelegate/templateApplicationScene(_:didConnect:))

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

[`-  templateApplicationScene:didConnectInterfaceController:toWindow:`](/documentation/CarPlay/CPTemplateApplicationSceneDelegate/templateApplicationScene(_:didConnect:to:))

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

[`-  templateApplicationScene:didDisconnectInterfaceController:`](/documentation/CarPlay/CPTemplateApplicationSceneDelegate/templateApplicationScene(_:didDisconnectInterfaceController:))

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

[`-  templateApplicationScene:didDisconnectInterfaceController:fromWindow:`](/documentation/CarPlay/CPTemplateApplicationSceneDelegate/templateApplicationScene(_:didDisconnect:from:))

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

### Responding to User Actions

[`-  templateApplicationScene:didSelectManeuver:`](/documentation/CarPlay/CPTemplateApplicationSceneDelegate/templateApplicationScene(_:didSelect:)-5rf2h)

Tells the delegate when the user selects a maneuver while the app is in the background.

[`-  templateApplicationScene:didSelectNavigationAlert:`](/documentation/CarPlay/CPTemplateApplicationSceneDelegate/templateApplicationScene(_:didSelect:)-7bie0)

Tells the delegate when the user selects a navigation alert while the app is in the background.

### Instance Methods

[`-  contentStyleDidChange:`](/documentation/CarPlay/CPTemplateApplicationSceneDelegate/contentStyleDidChange(_:))

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`UISceneDelegate`](/documentation/UIKit/UISceneDelegate)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)