---
title: availableAttitudeReferenceFrames()
framework: coremotion
role: symbol
role_heading: Type Method
path: coremotion/cmmotionmanager/availableattitudereferenceframes()
---

# availableAttitudeReferenceFrames()

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

## Declaration

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

## Return Value

Return Value A bitmask that you can bitwise-AND with the enum constants of the CMAttitudeReferenceFrame type.

## Discussion

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 value. if ([CMMotionManager availableAttitudeReferenceFrames] & CMAttitudeReferenceFrameXMagneticNorthZVertical) {     // do something appropriate here }

## See Also

### Accessing Attitude Reference Frames

- [attitudeReferenceFrame](coremotion/cmmotionmanager/attitudereferenceframe.md)
