Type Alias

CMStepUpdateHandler

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

Declaration

typealias CMStepUpdateHandler = (Int, Date, 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

func startStepCountingUpdates(to: OperationQueue, updateOn: Int, withHandler: CMStepUpdateHandler)

Starts the delivery of current step-counting data to your app.

Deprecated
func stopStepCountingUpdates()

Stops the delivery of step-counting updates to your app.

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