<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreLocation",
  "identifier" : "/documentation/CoreLocation/CLHeading",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Location"
    ],
    "preciseIdentifier" : "c:objc(cs)CLHeading"
  },
  "title" : "CLHeading"
}
-->

# CLHeading

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

```
class CLHeading
```

## Overview

A [`CLHeading`](/documentation/CoreLocation/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`](/documentation/CoreLocation/CLLocationManager) object whose [`startUpdatingHeading()`](/documentation/CoreLocation/CLLocationManager/startUpdatingHeading()) method you called.

> Note:
> If you want heading objects to contain valid data for the ``doc://com.apple.corelocation/documentation/CoreLocation/CLHeading/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 ``doc://com.apple.corelocation/documentation/CoreLocation/CLLocationManager/startUpdatingLocation()`` method.

## Topics

### Getting the heading values

[`magneticHeading`](/documentation/CoreLocation/CLHeading/magneticHeading)

The heading (measured in degrees) relative to magnetic north.

[`trueHeading`](/documentation/CoreLocation/CLHeading/trueHeading)

The heading (measured in degrees) relative to true north.

[`headingAccuracy`](/documentation/CoreLocation/CLHeading/headingAccuracy)

The maximum deviation (measured in degrees) between the reported heading and the true geomagnetic heading.

### Getting the raw heading data

[`x`](/documentation/CoreLocation/CLHeading/x)

The geomagnetic data (measured in microteslas) for the x-axis.

[`y`](/documentation/CoreLocation/CLHeading/y)

The geomagnetic data (measured in microteslas) for the y-axis.

[`z`](/documentation/CoreLocation/CLHeading/z)

The geomagnetic data (measured in microteslas) for the z-axis.

[`CLHeadingComponentValue`](/documentation/CoreLocation/CLHeadingComponentValue)

A type used to report magnetic differences reported by the onboard hardware.

### Getting the event timestamp

[`timestamp`](/documentation/CoreLocation/CLHeading/timestamp)

The time at which this heading was determined.



---

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)