<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMotion",
  "identifier" : "/documentation/CoreMotion/CMPedometer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Motion"
    ],
    "preciseIdentifier" : "c:objc(cs)CMPedometer"
  },
  "title" : "CMPedometer"
}
-->

# CMPedometer

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

```
class CMPedometer
```

## 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:)`](/documentation/CoreMotion/CMPedometer/queryPedometerData(from:to:withHandler:)) method to retrieve data that has already been gathered. To get live updates, use the [`startUpdates(from:withHandler:)`](/documentation/CoreMotion/CMPedometer/startUpdates(from:withHandler:)) method to start the delivery of events to the handler you provide.

> Important:
> To use this API, you must include the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/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`](/documentation/CoreMotion/CMPedometer/isStepCountingAvailable())

Returns a Boolean value indicating whether step counting is available on the current device.

[`+  isDistanceAvailable`](/documentation/CoreMotion/CMPedometer/isDistanceAvailable())

Returns a Boolean value indicating whether distance estimation is available on the current device.

[`+  isFloorCountingAvailable`](/documentation/CoreMotion/CMPedometer/isFloorCountingAvailable())

Returns a Boolean value indicating whether floor counting is available on the current device.

[`+  isPaceAvailable`](/documentation/CoreMotion/CMPedometer/isPaceAvailable())

Returns a Boolean value indicating whether pace information is available on the current device.

[`+  isCadenceAvailable`](/documentation/CoreMotion/CMPedometer/isCadenceAvailable())

Returns a Boolean value indicating whether cadence information is available on the current device.

[`+  isPedometerEventTrackingAvailable`](/documentation/CoreMotion/CMPedometer/isPedometerEventTrackingAvailable())

Returns a Boolean value indicating whether pedometer events are available on the current device.

[`+  authorizationStatus`](/documentation/CoreMotion/CMPedometer/authorizationStatus())

Returns a value indicating whether the app is authorized to gather pedometer data.

[`CMAuthorizationStatus`](/documentation/CoreMotion/CMAuthorizationStatus)

The authorization status for motion-related features.

### Gathering Live Pedometer Data

[`-  startPedometerUpdatesFromDate:withHandler:`](/documentation/CoreMotion/CMPedometer/startUpdates(from:withHandler:))

Starts the delivery of recent pedestrian-related data to your app.

[`-  stopPedometerUpdates`](/documentation/CoreMotion/CMPedometer/stopUpdates())

Stops the delivery of recent pedestrian data updates to your app.

[`-  startPedometerEventUpdatesWithHandler:`](/documentation/CoreMotion/CMPedometer/startEventUpdates(handler:))

Starts the delivery of pedometer events to your app.

[`-  stopPedometerEventUpdates`](/documentation/CoreMotion/CMPedometer/stopEventUpdates())

Stops the delivery of pedometer events to your app.

[`CMPedometerHandler`](/documentation/CoreMotion/CMPedometerHandler)

A block for processing pedometer-related data.

[`CMPedometerEventHandler`](/documentation/CoreMotion/CMPedometerEventHandler)

A block for processing pedometer events.

### Fetching Historical Pedometer Data

[`-  queryPedometerDataFromDate:toDate:withHandler:`](/documentation/CoreMotion/CMPedometer/queryPedometerData(from:to:withHandler:))

Retrieves the data between the specified start and end dates.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)