Type Alias


A block that reports the number of steps for a query operation.


typealias CMStepQueryHandler = (Int, Error?) -> Void


This block takes two parameters:


The number of steps that occurred between the start and end times specified by the query.


An error object indicating that there was a problem gathering the data or nil if the number of steps was determined correctly.

See Also

Getting Historical Step Counting Data

func queryStepCountStarting(from: Date, to: Date, to: OperationQueue, withHandler: CMStepQueryHandler)

Gathers and returns historical step count data for the specified time period.


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