---
title: deviceMotion
framework: coremotion
role: symbol
role_heading: Instance Property
path: coremotion/cmmotionmanager/devicemotion
---

# deviceMotion

The latest sample of device-motion data.

## Declaration

```swift
var deviceMotion: CMDeviceMotion? { get }
```

## Mentioned in

Getting processed device-motion data

## Discussion

Discussion If no device-motion data is available, the value of this property is nil. An app that is receiving device-motion data after calling startDeviceMotionUpdates() periodically checks the value of this property and processes the device-motion data.

## See Also

### Managing Device Motion Updates

- [showsDeviceMovementDisplay](coremotion/cmmotionmanager/showsdevicemovementdisplay.md)
- [deviceMotionUpdateInterval](coremotion/cmmotionmanager/devicemotionupdateinterval.md)
- [startDeviceMotionUpdates(using:to:withHandler:)](coremotion/cmmotionmanager/startdevicemotionupdates(using:to:withhandler:).md)
- [startDeviceMotionUpdates(to:withHandler:)](coremotion/cmmotionmanager/startdevicemotionupdates(to:withhandler:).md)
- [startDeviceMotionUpdates(using:)](coremotion/cmmotionmanager/startdevicemotionupdates(using:).md)
- [startDeviceMotionUpdates()](coremotion/cmmotionmanager/startdevicemotionupdates().md)
- [stopDeviceMotionUpdates()](coremotion/cmmotionmanager/stopdevicemotionupdates().md)
- [CMDeviceMotionHandler](coremotion/cmdevicemotionhandler.md)
