<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMotion",
  "identifier" : "/documentation/CoreMotion/CMMotionManager/availableAttitudeReferenceFrames()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Motion"
    ],
    "preciseIdentifier" : "c:objc(cs)CMMotionManager(cm)availableAttitudeReferenceFrames"
  },
  "title" : "availableAttitudeReferenceFrames()"
}
-->

# availableAttitudeReferenceFrames()

Returns a bitmask of the available reference frames for reporting the attitude of the current device.

```
class func availableAttitudeReferenceFrames() -> CMAttitudeReferenceFrame
```

## Return Value

A bitmask that you can bitwise-AND with the `enum` constants of the [`CMAttitudeReferenceFrame`](/documentation/CoreMotion/CMAttitudeReferenceFrame) type.

## Discussion

When starting a service that allows you to specify a reference frame, it’s your responsibility to specify a reference frame that’s available on the current device. Some reference frames might be unavailable because the required hardware isn’t present or not currently available.

The following example shows how to call this method and test for the availability of the [`xMagneticNorthZVertical`](/documentation/CoreMotion/CMAttitudeReferenceFrame/xMagneticNorthZVertical) value.

```objc
if ([CMMotionManager availableAttitudeReferenceFrames] & CMAttitudeReferenceFrameXMagneticNorthZVertical) {
    // do something appropriate here
}
```

---

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)