<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMotion",
  "identifier" : "/documentation/CoreMotion/CMAbsoluteAltitudeHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Core Motion"
    ],
    "preciseIdentifier" : "c:@T@CMAbsoluteAltitudeHandler"
  },
  "title" : "CMAbsoluteAltitudeHandler"
}
-->

# CMAbsoluteAltitudeHandler

A block for receiving absolute altitude data.

```
typealias CMAbsoluteAltitudeHandler = (CMAbsoluteAltitudeData?, (any Error)?) -> Void
```

## Parameters

`altitudeData`

The current altitude for the device. If there’s an error generating the data, this parameter is `nil`.

`error`

The error object. Returns `nil` if the altimeter successfully delivers the altitude data. When an error occurs, you can use the information in the provided object to recover the data or to alert the user.

## Discussion

You pass a block of this type to the altimeter object’s [`startAbsoluteAltitudeUpdates(to:withHandler:)`](/documentation/CoreMotion/CMAltimeter/startAbsoluteAltitudeUpdates(to:withHandler:)) method when starting the delivery of altitude data.

> Note:
> Absolute altitude is only available on iPhone 12 and later and Apple Watch 6 or SE and later.

---

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)