CMPedometer
An object for fetching the system-generated live walking data.
Declaration
class CMPedometerOverview
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
isStepCountingAvailable()isDistanceAvailable()isFloorCountingAvailable()isPaceAvailable()isCadenceAvailable()isPedometerEventTrackingAvailable()authorizationStatus()CMAuthorizationStatus
Gathering Live Pedometer Data
startUpdates(from:withHandler:)stopUpdates()startEventUpdates(handler:)stopEventUpdates()CMPedometerHandlerCMPedometerEventHandler