<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMotion",
  "identifier" : "/documentation/CoreMotion/CMError",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Motion"
    ],
    "preciseIdentifier" : "c:@EA@CMError"
  },
  "title" : "CMError"
}
-->

# CMError

Defines motion errors.

```
struct CMError
```

## Topics

### Errors

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

The device must move for a sampling of motion data to occur.

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

The specified action is invalid.

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

The specified parameter is invalid.

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

The app isn’t currently authorized to use motion activity support.

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

Motion activity support isn’t available on the current device.

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

The app is missing an entitlement for the requested activity.

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

Core Motion didn’t return any data.

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

No error occurred.

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

The app isn’t authorized to use the Core Motion framework.

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

The requested service isn’t available on this device.

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

The app is missing a required entitlement.

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

The data is the incorrect size.

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

True north isn’t available on this device.

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

An unknown error occurred.

### Initializers

[`init(_:)`](/documentation/CoreMotion/CMError/init(_:))

[`init(rawValue:)`](/documentation/CoreMotion/CMError/init(rawValue:))

### Instance Properties

[`rawValue`](/documentation/CoreMotion/CMError/rawValue)

## Relationships

### Conforms To

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Equatable`](/documentation/Swift/Equatable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)