Information about the distance traveled by a user on foot.


class CMPedometerData : NSObject


You do not create instances of this class yourself. Instead, you use a CMPedometer object to request pedometer data from the system. The data for each request is packaged into an instance of this class and delivered to the handlers you registered with the pedometer object.


Getting the Dates

var startDate: Date

The start time for the pedometer data.

var endDate: Date

The end time for the pedometer data.

Getting the Pedestrian Data

var numberOfSteps: NSNumber

The number of steps taken by the user.

var distance: NSNumber?

The estimated distance (in meters) traveled by the user.

var averageActivePace: NSNumber?

The average pace of the user, measured in seconds per meter.

var currentPace: NSNumber?

The current pace of the user, measured in seconds per meter.

var currentCadence: NSNumber?

The rate at which steps are taken, measured in steps per second.

Getting the Floor Counts

var floorsAscended: NSNumber?

The approximate number of floors ascended by walking.

var floorsDescended: NSNumber?

The approximate number of floors descended by walking.


Inherits From

See Also


class CMPedometer

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

class CMPedometerEvent

A change in the user's pedestrian activity.

class CMStepCounter

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


Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software