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