---
title: CMPedometer
framework: coremotion
role: symbol
role_heading: Class
path: coremotion/cmpedometer
---

# CMPedometer

An object for fetching the system-generated live walking data.

## Declaration

```swift
class CMPedometer
```

## Overview

Overview You use a pedometer object to retrieve step counts and other information about the distance traveled and the number of floors ascended or descended. The pedometer object manages a cache of historic data that you can query or you can ask for live updates as the data is processed. To use a pedometer object, create an instance of this class and call the appropriate methods. Use the queryPedometerData(from:to:withHandler:) method to retrieve data that has already been gathered. To get live updates, use the startUpdates(from:withHandler:) method to start the delivery of events to the handler you provide. important: To use this API, you must include the NSMotionUsageDescription key in your app’s Info.plist file and provide a usage description string for this key. The usage description appears in the prompt that the user must accept the first time the system asks the user to access motion data for your app. If you don’t include a usage description string, your app crashes when you call this API.

## Topics

### Determining Pedometer Availability

- [isStepCountingAvailable()](coremotion/cmpedometer/isstepcountingavailable().md)
- [isDistanceAvailable()](coremotion/cmpedometer/isdistanceavailable().md)
- [isFloorCountingAvailable()](coremotion/cmpedometer/isfloorcountingavailable().md)
- [isPaceAvailable()](coremotion/cmpedometer/ispaceavailable().md)
- [isCadenceAvailable()](coremotion/cmpedometer/iscadenceavailable().md)
- [isPedometerEventTrackingAvailable()](coremotion/cmpedometer/ispedometereventtrackingavailable().md)
- [authorizationStatus()](coremotion/cmpedometer/authorizationstatus().md)
- [CMAuthorizationStatus](coremotion/cmauthorizationstatus.md)

### 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)
- [CMPedometerHandler](coremotion/cmpedometerhandler.md)
- [CMPedometerEventHandler](coremotion/cmpedometereventhandler.md)

### Fetching Historical Pedometer Data

- [queryPedometerData(from:to:withHandler:)](coremotion/cmpedometer/querypedometerdata(from:to:withhandler:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Pedometer and fitness

- [CMPedometerData](coremotion/cmpedometerdata.md)
- [CMPedometerEvent](coremotion/cmpedometerevent.md)
- [CMStepCounter](coremotion/cmstepcounter.md)
- [CMOdometerData](coremotion/cmodometerdata.md)
- [CMHighFrequencyHeartRateData](coremotion/cmhighfrequencyheartratedata.md)
