Starts the delivery of altitude data to the specified handler block.
- iOS 8.0+
- Mac Catalyst 13.0+Beta
- watchOS 2.0+
- Core Motion
The operation queue on which to execute your handler block. The altimeter object stores a strong reference to this object. This parameter must not be
The handler block to execute when new altitude data is available. This parameter must not be
nil. For information about the format of this block, see
Call this method to initiate the delivery of events. The altimeter object stores a strong reference to the specified queue and makes a copy of your block. If you call the method a second time, the altimeter object releases its references to the previous queue and handler before storing references to the new ones. So only the last installed handler receives events. When you no longer need the altitude data, or when an error occurs, call the
stop method to stop the delivery of events.
If altitude data is not available on the current device, this method does nothing.