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

# CPTrip

An object that represents a journey between an origin and a destination.

```
class CPTrip
```

## Overview

A trip represents a journey consisting of an origin, a destination, and up to three route choices. Use [`CPRouteChoice`](/documentation/CarPlay/CPRouteChoice) to define each possible route choice.

You create trips after the user has selected a destination, and present up to twelve trip previews by calling [`showTripPreviews(_:textConfiguration:)`](/documentation/CarPlay/CPMapTemplate/showTripPreviews(_:textConfiguration:)) on the map template.

You provide estimates for each trip using the map template’s [`updateEstimates(_:for:)`](/documentation/CarPlay/CPMapTemplate/updateEstimates(_:for:)) method, and must update these estimates if the remaining time or distance changes.

## Topics

### Creating a Trip

[`-  initWithOrigin:destination:routeChoices:`](/documentation/CarPlay/CPTrip/init(origin:destination:routeChoices:))

Creates a trip with an origin, destination, and route choices.

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

A possible route for a trip.

### Getting the Trip’s Origin and Destination

[`origin`](/documentation/CarPlay/CPTrip/origin)

The trip’s origin.

[`destination`](/documentation/CarPlay/CPTrip/destination)

The trip’s destination.

### Getting Route Choices

[`routeChoices`](/documentation/CarPlay/CPTrip/routeChoices)

The list of route choices for the trip.

[`destinationNameVariants`](/documentation/CarPlay/CPTrip/destinationNameVariants)

An array of strings that represents the names of the destination for this trip, arranged from most to least preferred.

### Providing Additional Information

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

A custom object associated with the trip.

## Relationships

### Conforms To

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

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

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

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

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

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

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

[`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)