---
title: CMAbsoluteAltitudeHandler
framework: coremotion
role: symbol
role_heading: Type Alias
path: coremotion/cmabsolutealtitudehandler
---

# CMAbsoluteAltitudeHandler

A block for receiving absolute altitude data.

## Declaration

```swift
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

Discussion You pass a block of this type to the altimeter object’s 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.

## See Also

### Starting and Stopping Altitude Updates

- [startAbsoluteAltitudeUpdates(to:withHandler:)](coremotion/cmaltimeter/startabsolutealtitudeupdates(to:withhandler:).md)
- [stopAbsoluteAltitudeUpdates()](coremotion/cmaltimeter/stopabsolutealtitudeupdates().md)
- [startRelativeAltitudeUpdates(to:withHandler:)](coremotion/cmaltimeter/startrelativealtitudeupdates(to:withhandler:).md)
- [stopRelativeAltitudeUpdates()](coremotion/cmaltimeter/stoprelativealtitudeupdates().md)
- [CMAltitudeHandler](coremotion/cmaltitudehandler.md)
