An object representing an active route guidance session.


class CPNavigationSession : NSObject


To begin a navigation session, call startNavigationSession(for:) on the map template. This returns the active navigation session that you use to:

  • Set upcoming maneuvers.

  • Update travel estimates.

  • Pause, cancel, or finish a trip.


Getting the Trip

var trip: CPTrip

The trip associated with the navigation session.

Managing Upcoming Maneuvers

var upcomingManeuvers: [CPManeuver]

The next set of maneuvers the user should perform while following the current route.

Updating Travel Estimates

func updateEstimates(CPTravelEstimates, for: CPManeuver)

Updates the travel estimates for the specified maneuver.

class CPTravelEstimates

An object that describes the time and distance remaining for a maneuver in a navigation session.

Managing Trip Navigation

func cancelTrip()

Tells the navigation session to cancel the trip.

func finishTrip()

Tells the navigation session to finish the trip.

func pauseTrip(for: CPNavigationSession.PauseReason, description: String?)

Tells the navigation session to pause the trip for the specified reason.

enum CPNavigationSession.PauseReason

A set of reasons for pausing a trip.


Inherits From

Conforms To

See Also

Route Guidance

class CPTrip

A journey consisting of an origin, a destination, and route choices.

class CPManeuver

A maneuver containing navigation instructions and distance from the previous maneuver.