---
title: CMPedometerHandler
framework: coremotion
role: symbol
role_heading: Type Alias
path: coremotion/cmpedometerhandler
---

# CMPedometerHandler

A block for processing pedometer-related data.

## Declaration

```swift
typealias CMPedometerHandler = (CMPedometerData?, (any Error)?) -> Void
```

## Discussion

Discussion You provide a block of this type when requesting data from the CMPedometer object. When the data becomes available, the pedometer object delivers that data to your block for processing. If there was an error retrieving the data, the pedometer object provides an error object instead. This block has no return value and takes the following parameters:

## See Also

### Gathering Live Pedometer Data

- [startUpdates(from:withHandler:)](coremotion/cmpedometer/startupdates(from:withhandler:).md)
- [stopUpdates()](coremotion/cmpedometer/stopupdates().md)
- [startEventUpdates(handler:)](coremotion/cmpedometer/starteventupdates(handler:).md)
- [stopEventUpdates()](coremotion/cmpedometer/stopeventupdates().md)
- [CMPedometerEventHandler](coremotion/cmpedometereventhandler.md)
