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

# CPContactTemplate

A template that displays information about a person or a business.

```
@MainActor class CPContactTemplate
```

## Overview

The contact template can provide up to four contextual actions a user can invoke. For example, you might have an action that provides directions to the contact’s address.

When creating a contact template, you provide an instance of [`CPContact`](/documentation/CarPlay/CPContact) that contains a contact’s name and image, and optional subtitle. The object also contains any actions relevant to the contact. CarPlay provides specialized buttons for common actions, such as [`CPContactCallButton`](/documentation/CarPlay/CPContactCallButton) or [`CPContactMessageButton`](/documentation/CarPlay/CPContactMessageButton).

To display a contact template, call your interface controller’s [`pushTemplate(_:animated:completion:)`](/documentation/CarPlay/CPInterfaceController/pushTemplate(_:animated:completion:)) method to push it onto the navigation hierarchy, or [`presentTemplate(_:animated:completion:)`](/documentation/CarPlay/CPInterfaceController/presentTemplate(_:animated:completion:)) to present it modally.

> Note:
> `CPContactTemplate` is only available in apps that have the communication or navigation entitlements.

## Topics

### Creating a Contact Template

[`-  initWithContact:`](/documentation/CarPlay/CPContactTemplate/init(contact:))

Creates a contact template that displays the provided contact.

### Configuring the Contact

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

The contact that the template displays.

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

A data object that contains information about a contact.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

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

### Inherits From

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

---

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)