Contents

CMPedometer

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

Declaration

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:) 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.

Topics

Determining Pedometer Availability

Gathering Live Pedometer Data

Fetching Historical Pedometer Data

See Also

Pedometer and fitness