Type Alias

CMStepQueryHandler

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

Declaration

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

Discussion

This block takes two parameters:

numberOfSteps

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

error

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.

Deprecated

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