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

# CPContact

A data object that contains information about a contact.

```
class CPContact
```

## Overview

`CPContact` is an object that represents information about a person or a business, and can include a set of contextually relevant actions that a user can perform when CarPlay displays the contact, such as getting directions to its location.

You display a contact using [`CPContactTemplate`](/documentation/CarPlay/CPContactTemplate). The template manages the appearance of the contact, and can display up to four action buttons. After displaying it, you can update the buttons for the template by assigning a new array to the contact’s [`actions`](/documentation/CarPlay/CPContact/actions) property.

The framework provides specialized buttons for common actions, such as [`CPContactCallButton`](/documentation/CarPlay/CPContactCallButton) or [`CPContactMessageButton`](/documentation/CarPlay/CPContactMessageButton).

## Topics

### Creating a Contact

[`init(name: String, image: UIImage)`](/documentation/CarPlay/CPContact/init(name:image:))

Creates a contact with a name and an image.

### Configuring the Contact’s Attributes

[`var image: UIImage`](/documentation/CarPlay/CPContact/image)

The contact’s image.

[`var name: String`](/documentation/CarPlay/CPContact/name)

The contact’s name.

[`var subtitle: String?`](/documentation/CarPlay/CPContact/subtitle)

A subtitle that the template displays in addition to the contact’s name.

[`var informativeText: String?`](/documentation/CarPlay/CPContact/informativeText)

Additional text that the template displays.

### Managing Interactions with the Contact

[`var actions: [CPButton]?`](/documentation/CarPlay/CPContact/actions)

The actions that the template displays for this contact.

[`class CPContactCallButton`](/documentation/CarPlay/CPContactCallButton)

A button for calling the contact.

[`class CPContactDirectionsButton`](/documentation/CarPlay/CPContactDirectionsButton)

A button for getting directions to the contact’s location.

[`class CPContactMessageButton`](/documentation/CarPlay/CPContactMessageButton)

A button that activates Siri and initiates the compose message flow.

### Initializers

[`init?(coder: NSCoder)`](/documentation/CarPlay/CPContact/init(coder:))

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

### 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)