<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMotion",
  "identifier" : "/documentation/CoreMotion/CMHeadphoneActivityManager",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Motion"
    ],
    "preciseIdentifier" : "c:objc(cs)CMHeadphoneActivityManager"
  },
  "title" : "CMHeadphoneActivityManager"
}
-->

# CMHeadphoneActivityManager

An object that starts and manages headphone activity services.

```
class CMHeadphoneActivityManager
```

## Overview

This class delivers headphone activity updates to your app. Use an instance of the manager to determine if the device supports headphone activity updates, and to start and stop updates. Before using this class, check [`isActivityAvailable`](/documentation/CoreMotion/CMHeadphoneActivityManager/isActivityAvailable) and [`isStatusAvailable`](/documentation/CoreMotion/CMHeadphoneActivityManager/isStatusAvailable) to make sure the features are available.

This class provides similar information to [`CMMotionActivityManager`](/documentation/CoreMotion/CMMotionActivityManager), except the activity information comes from headphone motion, rather than from device motion.

> Important:
> In iOS and macOS, include the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSMotionUsageDescription> key in your app’s `Info.plist` file. If this key is absent, trying to start headphone activity updates terminates your app.

## Topics

### Checking Availability

[`activityAvailable`](/documentation/CoreMotion/CMHeadphoneActivityManager/isActivityAvailable)

A Boolean value that indicates whether the current device supports headphone activity.

[`activityActive`](/documentation/CoreMotion/CMHeadphoneActivityManager/isActivityActive)

A Boolean value that indicates whether headphone motion activity is active.

[`statusAvailable`](/documentation/CoreMotion/CMHeadphoneActivityManager/isStatusAvailable)

A Boolean value that indicates whether the current device supports headphone status.

[`statusActive`](/documentation/CoreMotion/CMHeadphoneActivityManager/isStatusActive)

A Boolean value that indicates whether headphone status is active.

[`+  authorizationStatus`](/documentation/CoreMotion/CMHeadphoneActivityManager/authorizationStatus())

Returns the authorization status for monitoring headphone activity.

### Starting and Stopping Updates

[`-  startActivityUpdatesToQueue:withHandler:`](/documentation/CoreMotion/CMHeadphoneActivityManager/startActivityUpdates(to:withHandler:))

Starts headphone activity updates, providing data to the given handler through the given queue.

[`-  stopActivityUpdates`](/documentation/CoreMotion/CMHeadphoneActivityManager/stopActivityUpdates())

Stops headphone activity updates.

[`-  startStatusUpdatesToQueue:withHandler:`](/documentation/CoreMotion/CMHeadphoneActivityManager/startStatusUpdates(to:withHandler:))

Starts headphone status updates, providing data to the given handler through the given queue.

[`-  stopStatusUpdates`](/documentation/CoreMotion/CMHeadphoneActivityManager/stopStatusUpdates())

Stops headphone status updates.

### Supporting Types

[`Status`](/documentation/CoreMotion/CMHeadphoneActivityManager/Status)

Headphone connection status updates.

[`ActivityHandler`](/documentation/CoreMotion/CMHeadphoneActivityManager/ActivityHandler)

The type for a handler to be invoked when headphone motion activity data is available.

[`StatusHandler`](/documentation/CoreMotion/CMHeadphoneActivityManager/StatusHandler)

The type for a handler to be invoked with status updates.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)