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

# CPTemplate

An abstract base class for interface templates.

```
@MainActor class CPTemplate
```

## Overview

`CPTemplate` is an abstract base class for defining CarPlay user interface templates. It provides the common functionality present in all templates.

You don’t use this class directly, or create your own subclasses. Instead, you must use one of the prebuilt templates, such as [`CPListTemplate`](/documentation/CarPlay/CPListTemplate) or [`CPGridTemplate`](/documentation/CarPlay/CPGridTemplate).

## Topics

### Accessing Template Information

[`userInfo`](/documentation/CarPlay/CPTemplate/userInfo)

Any custom data or object that you want to associate with the template.

### Accessing Tab Information

[`tabTitle`](/documentation/CarPlay/CPTemplate/tabTitle)

A short title that describes the content of the tab.

[`tabImage`](/documentation/CarPlay/CPTemplate/tabImage)

An image that represents the content of the tab.

[`tabSystemItem`](/documentation/CarPlay/CPTemplate/tabSystemItem)

A system object that provides a title and image for common tab content, such as contacts or favorites.

[`showsTabBadge`](/documentation/CarPlay/CPTemplate/showsTabBadge)

An indicator you use to call attention to the tab.

## Relationships

### Conforms To

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

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

[`Equatable`](/documentation/Swift/Equatable)

### Inherited By

[`CPActionSheetTemplate`](/documentation/CarPlay/CPActionSheetTemplate)

[`CPVoiceControlTemplate`](/documentation/CarPlay/CPVoiceControlTemplate)

[`CPPointOfInterestTemplate`](/documentation/CarPlay/CPPointOfInterestTemplate)

[`CPNowPlayingTemplate`](/documentation/CarPlay/CPNowPlayingTemplate)

[`CPContactTemplate`](/documentation/CarPlay/CPContactTemplate)

[`CPAlertTemplate`](/documentation/CarPlay/CPAlertTemplate)

[`CPInformationTemplate`](/documentation/CarPlay/CPInformationTemplate)

[`CPTabBarTemplate`](/documentation/CarPlay/CPTabBarTemplate)

[`CPListTemplate`](/documentation/CarPlay/CPListTemplate)

[`CPMapTemplate`](/documentation/CarPlay/CPMapTemplate)

[`CPGridTemplate`](/documentation/CarPlay/CPGridTemplate)

[`CPSearchTemplate`](/documentation/CarPlay/CPSearchTemplate)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)