<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMotion",
  "identifier" : "/documentation/CoreMotion/CMMotionManager/startDeviceMotionUpdates(to:withHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Motion"
    ],
    "preciseIdentifier" : "c:objc(cs)CMMotionManager(im)startDeviceMotionUpdatesToQueue:withHandler:"
  },
  "title" : "startDeviceMotionUpdates(to:withHandler:)"
}
-->

# startDeviceMotionUpdates(to:withHandler:)

Starts device-motion updates on an operation queue and using a specified block handler.

```
func startDeviceMotionUpdates(to queue: OperationQueue, withHandler handler: @escaping CMDeviceMotionHandler)
```

## Parameters

`queue`

An operation queue provided by the caller. Because the processed events might arrive at a high rate, using the main operation queue is not recommended.

`handler`

A block that is invoked with each update to handle new device-motion data. The block must conform to the [`CMDeviceMotionHandler`](/documentation/CoreMotion/CMDeviceMotionHandler) type.

## Discussion

This method reports motion relative to the reference frame in the [`attitudeReferenceFrame`](/documentation/CoreMotion/CMMotionManager/attitudeReferenceFrame) property. You must call [`stopDeviceMotionUpdates()`](/documentation/CoreMotion/CMMotionManager/stopDeviceMotionUpdates()) when you no longer want your app to process device-motion updates.

---

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)