---
title: attitudeReferenceFrame
framework: coremotion
role: symbol
role_heading: Instance Property
path: coremotion/cmmotionmanager/attitudereferenceframe
---

# attitudeReferenceFrame

Returns either the reference frame currently being used or the default attitude reference frame.

## Declaration

```swift
var attitudeReferenceFrame: CMAttitudeReferenceFrame { get }
```

## Mentioned in

Getting processed device-motion data

## Discussion

Discussion If the device-motion service is active, this property returns the reference frame currently in use. If the service is inactive, but your app started it at some point since launch, this property contains the last reference frame you used. If you haven’t started the device-motion service since app launch, this property returns the default frame of reference, which is xArbitraryZVertical. If device motion is not available on the current device, the value of this property is undefined.

## See Also

### Related Documentation

- [isDeviceMotionAvailable](coremotion/cmmotionmanager/isdevicemotionavailable.md)

### Accessing Attitude Reference Frames

- [availableAttitudeReferenceFrames()](coremotion/cmmotionmanager/availableattitudereferenceframes().md)
