Type Alias


A block that reports the motion updates that occurred between the specified query interval.


typedef void (^CMMotionActivityQueryHandler)(NSArray<CMMotionActivity *> *activities, NSError *error);


This block takes the following parameters:


An array of CMMotionActivity objects indicating the updates that occurred. The objects in the array are ordered by the time at which they occurred in the specified time interval. Use the startDate property in each motion object to determine when the update occurred.


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

See Also

Getting Historical Activity Data

- queryActivityStartingFromDate:toDate:toQueue:withHandler:

Gathers and returns historical motion data for the specified time period