---
title: CPContactDirectionsButton
framework: carplay
role: symbol
role_heading: Class
path: carplay/cpcontactdirectionsbutton
---

# CPContactDirectionsButton

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

## Declaration

```swift
class CPContactDirectionsButton
```

## Overview

Overview Use this button to get directions to the location of the template’s contact. If your app doesn’t provide turn-by-turn navigation, use the maps URL scheme to launch the most recent navigation app. Call your template application scene’s open(_:options:completionHandler:) method and pass a URL that embeds the contact’s location. CarPlay provides this scene to your CPTemplateApplicationSceneDelegate when the scene connects.

## Topics

### Creating a Contact Directions Button

- [init(handler:)](carplay/cpcontactdirectionsbutton/init(handler:).md)

## Relationships

### Inherits From

- [CPButton](carplay/cpbutton.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Managing Interactions with the Contact

- [actions](carplay/cpcontact/actions.md)
- [CPContactCallButton](carplay/cpcontactcallbutton.md)
- [CPContactMessageButton](carplay/cpcontactmessagebutton.md)
