---
title: CMStepCounter
framework: coremotion
role: symbol
role_heading: Class
path: coremotion/cmstepcounter
---

# CMStepCounter

The number of steps the user has taken with the device.

## Declaration

```swift
class CMStepCounter
```

## Overview

Overview Step information is gathered on devices with the appropriate built-in hardware and stored so that you can run queries to determine the user’s recent physical activity. You use this class to gather both current step data and any historical data.

## Topics

### Determining Step Counting Availability

- [isStepCountingAvailable()](coremotion/cmstepcounter/isstepcountingavailable().md)

### Starting and Stopping Step Counting Updates

- [startStepCountingUpdates(to:updateOn:withHandler:)](coremotion/cmstepcounter/startstepcountingupdates(to:updateon:withhandler:).md)
- [stopStepCountingUpdates()](coremotion/cmstepcounter/stopstepcountingupdates().md)
- [CMStepUpdateHandler](coremotion/cmstepupdatehandler.md)

### Getting Historical Step Counting Data

- [queryStepCountStarting(from:to:to:withHandler:)](coremotion/cmstepcounter/querystepcountstarting(from:to:to:withhandler:).md)
- [CMStepQueryHandler](coremotion/cmstepqueryhandler.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

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