Contents

CMStepUpdateHandler

A block that reports the number of steps recorded since updates began.

Declaration

typealias CMStepUpdateHandler = (Int, Date, (any Error)?) -> Void

Discussion

This block takes the following parameters:

numberOfSteps

The total number of steps since the startStepCountingUpdates(to:updateOn:withHandler:) method was called.

timestamp

The time at which the current step count was reported.

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

Starting and Stopping Step Counting Updates