<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PushToTalk",
  "identifier" : "/documentation/PushToTalk/PTChannelManager/setAccessoryButtonEventsEnabled(_:channelUUID:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Push to Talk"
    ],
    "preciseIdentifier" : "c:objc(cs)PTChannelManager(im)setAccessoryButtonEventsEnabled:forChannelUUID:completionHandler:"
  },
  "title" : "setAccessoryButtonEventsEnabled(_:channelUUID:completionHandler:)"
}
-->

# setAccessoryButtonEventsEnabled(_:channelUUID:completionHandler:)

Maps supported accessory button events to actions that begin and end transmission.

```
func setAccessoryButtonEventsEnabled(_ enabled: Bool, channelUUID: UUID, completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)
```

## Parameters

`enabled`

A flag that accessory button events map to begin and end transmission actions. If your app doesn’t map these button events to transmission actions, you can disable them by setting the value to <doc://com.apple.documentation/documentation/Swift/false>.

`channelUUID`

The unique channel identifier of the active participant.

`completionHandler`

An error that indicates the reason why the system couldn’t set the supported accessory button events.

## Discussion

> Important:
> You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration:
> 
> ```swift
> func setAccessoryButtonEventsEnabled(_ enabled: Bool, channelUUID: UUID) async throws
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

---

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)