---
title: CLHeading
framework: corelocation
role: symbol
role_heading: Class
path: corelocation/clheading
---

# CLHeading

The orientation of the user’s device, relative to true or magnetic north.

## Declaration

```swift
class CLHeading
```

## Overview

Overview A CLHeading object contains computed values for the device’s azimuth (orientation) relative to true or magnetic north. It also includes the raw data for the three-dimensional vector used to compute those values. A navigation app might use the information to rotate a map so that it reflects the direction that the user is facing. Typically, you don’t create instances of this class yourself, nor do you subclass it. Instead, you receive instances of this class through the delegate assigned to the CLLocationManager object whose startUpdatingHeading() method you called. note: If you want heading objects to contain valid data for the trueHeading property, configure your location manager object to deliver location updates. You can start the delivery of these updates by calling the location manager object’s startUpdatingLocation() method.

## Topics

### Getting the heading values

- [magneticHeading](corelocation/clheading/magneticheading.md)
- [trueHeading](corelocation/clheading/trueheading.md)
- [headingAccuracy](corelocation/clheading/headingaccuracy.md)

### Getting the raw heading data

- [x](corelocation/clheading/x.md)
- [y](corelocation/clheading/y.md)
- [z](corelocation/clheading/z.md)
- [CLHeadingComponentValue](corelocation/clheadingcomponentvalue.md)

### Getting the event timestamp

- [timestamp](corelocation/clheading/timestamp.md)

### Initializers

- [init(coder:)](corelocation/clheading/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Compass headings

- [Getting heading and course information](corelocation/getting-heading-and-course-information.md)
