---
title: CPContactTemplate
framework: carplay
role: symbol
role_heading: Class
path: carplay/cpcontacttemplate
---

# CPContactTemplate

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

## Declaration

```swift
@MainActor class CPContactTemplate
```

## Overview

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 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 or CPContactMessageButton. To display a contact template, call your interface controller’s pushTemplate(_:animated:completion:) method to push it onto the navigation hierarchy, or 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

- [init(contact:)](carplay/cpcontacttemplate/init(contact:).md)

### Configuring the Contact

- [contact](carplay/cpcontacttemplate/contact.md)
- [CPContact](carplay/cpcontact.md)

## Relationships

### Inherits From

- [CPTemplate](carplay/cptemplate.md)

### Conforms To

- [CPBarButtonProviding](carplay/cpbarbuttonproviding.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
