<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMotion",
  "identifier" : "/documentation/CoreMotion/CMMotionActivityManager",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Motion"
    ],
    "preciseIdentifier" : "c:objc(cs)CMMotionActivityManager"
  },
  "title" : "CMMotionActivityManager"
}
-->

# CMMotionActivityManager

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

```
class CMMotionActivityManager
```

## Overview

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

> Important:
> To use this API, you must include the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSMotionUsageDescription> key in your app’s `Info.plist` file and provide a usage description string for this key. The usage description appears in the prompt that the user must accept the first time the system asks the user to access motion data for your app. If you don’t include a usage description string, your app crashes when you call this API.

## Topics

### Determining Activity Availability

[`isActivityAvailable()`](/documentation/CoreMotion/CMMotionActivityManager/isActivityAvailable())

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

[`authorizationStatus()`](/documentation/CoreMotion/CMMotionActivityManager/authorizationStatus())

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

[`CMAuthorizationStatus`](/documentation/CoreMotion/CMAuthorizationStatus)

The authorization status for motion-related features.

### Starting and Stopping Activity Updates

[`startActivityUpdates(to:withHandler:)`](/documentation/CoreMotion/CMMotionActivityManager/startActivityUpdates(to:withHandler:))

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

[`stopActivityUpdates()`](/documentation/CoreMotion/CMMotionActivityManager/stopActivityUpdates())

Stops the delivery of motion updates to your app

[`CMMotionActivityHandler`](/documentation/CoreMotion/CMMotionActivityHandler)

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

### Getting Historical Activity Data

[`queryActivityStarting(from:to:to:withHandler:)`](/documentation/CoreMotion/CMMotionActivityManager/queryActivityStarting(from:to:to:withHandler:))

Gathers and returns historical motion data for the specified time period

[`CMMotionActivityQueryHandler`](/documentation/CoreMotion/CMMotionActivityQueryHandler)

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



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)