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

# CMMotionActivity

The data for a single motion update event.

```
class CMMotionActivity
```

## Overview

On devices that support motion, you can use a [`CMMotionActivityManager`](/documentation/CoreMotion/CMMotionActivityManager) or [`CMHeadphoneActivityManager`](/documentation/CoreMotion/CMHeadphoneActivityManager) object to request updates when the current type of motion changes. When a change occurs, the update information is packaged into a [`CMMotionActivity`](/documentation/CoreMotion/CMMotionActivity) object and sent to your app.

The motion-related properties of this class aren’t mutually exclusive. In other words, it’s possible for more than one of the motion-related properties to contain the value <doc://com.apple.documentation/documentation/Swift/true>. For example, if the user was driving in a car and the car stopped at a red light, the update event associated with that change in motion would have both the [`automotive`](/documentation/CoreMotion/CMMotionActivity/automotive) and [`stationary`](/documentation/CoreMotion/CMMotionActivity/stationary) properties set to <doc://com.apple.documentation/documentation/Swift/true>. It’s also possible for all of the properties to be set to <doc://com.apple.documentation/documentation/Swift/false> when the device is in motion but the movement doesn’t correlate to walking, running, cycling, or automotive travel.

You don’t create instances of this class yourself. The [`CMMotionActivityManager`](/documentation/CoreMotion/CMMotionActivityManager) object creates them and sends them to the handler block you registered. For more information about how to initiate the delivery of motion activity updates to your app, see [`CMMotionActivityManager`](/documentation/CoreMotion/CMMotionActivityManager).

## Topics

### Getting the Type of Motion

[`stationary`](/documentation/CoreMotion/CMMotionActivity/stationary)

A Boolean indicating whether the device is stationary.

[`walking`](/documentation/CoreMotion/CMMotionActivity/walking)

A Boolean indicating whether the device is on a walking person.

[`running`](/documentation/CoreMotion/CMMotionActivity/running)

A Boolean indicating whether the device is on a running person.

[`automotive`](/documentation/CoreMotion/CMMotionActivity/automotive)

A Boolean indicating whether the device is in an automobile.

[`cycling`](/documentation/CoreMotion/CMMotionActivity/cycling)

A Boolean indicating whether the device is in a bicycle.

[`unknown`](/documentation/CoreMotion/CMMotionActivity/unknown)

A Boolean indicating whether the type of motion is unknown.

### Getting Metadata for the Motion

[`startDate`](/documentation/CoreMotion/CMMotionActivity/startDate)

The time at which the change in motion occurred.

[`confidence`](/documentation/CoreMotion/CMMotionActivity/confidence)

The confidence in the assessment of the motion type.

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

The confidence that the motion data is accurate.



---

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)