An object that manages access to the motion data stored by the device.


@interface CMMotionActivityManager : NSObject


Motion data reflects whether the user is walking, running, in a vehicle, or stationary for periods of time. A navigation app might look for changes in the current type of motion and offer different directions for each. Using this class, you can ask for notifications when the current type of motion changes or you can gather past motion change data.


Determining Activity Availability

+ isActivityAvailable

Returns a Boolean indicating whether motion data is available on the current device.

+ authorizationStatus

Returns a value indicating whether the app is authorized to retrieve stored motion data.


The authorization status for motion-related features.

Starting and Stopping Activity Updates

- startActivityUpdatesToQueue:withHandler:

Starts the delivery of current motion data updates to your app.

- stopActivityUpdates

Stops the delivery of motion updates to your app


A block that reports the current motion associated with the device.

Getting Historical Activity Data

- queryActivityStartingFromDate:toDate:toQueue:withHandler:

Gathers and returns historical motion data for the specified time period


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


Inherits From

See Also

Historical Data


The data for a single motion update event.