Class

CMMotionActivityManager

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

Declaration

@interface CMMotionActivityManager : NSObject

Overview

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.

Topics

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.

CMAuthorizationStatus

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

CMMotionActivityHandler

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

CMMotionActivityQueryHandler

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

Relationships

Inherits From

See Also

Historical Data

CMMotionActivity

The data for a single motion update event.