<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CallKit",
  "identifier" : "/documentation/CallKit/CXProviderDelegate/provider(_:execute:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CallKit"
    ],
    "preciseIdentifier" : "c:objc(pl)CXProviderDelegate(im)provider:executeTransaction:"
  },
  "title" : "provider(_:execute:)"
}
-->

# provider(_:execute:)

Called when a transaction is executed by a call controller.

```
optional func provider(_ provider: CXProvider, execute transaction: CXTransaction) -> Bool
```

## Parameters

`provider`

The telephony provider.

`transaction`

Contains the upcoming actions.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the `transaction` was handled; otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Most delegates should not need to provide an implementation for this method. However, a delegate can implement this method to customize how transactions are handled. This method returns <doc://com.apple.documentation/documentation/Swift/true> to indicate that the custom implementation handled the transaction and returns <doc://com.apple.documentation/documentation/Swift/false> to have the provider execute the transaction normally—as if the delegate did not implement this method. For example, given a transaction consisting of a [`CXSetHeldCallAction`](/documentation/CallKit/CXSetHeldCallAction) object and a [`CXSetGroupCallAction`](/documentation/CallKit/CXSetGroupCallAction) object, the delegate may override this method to inject a 30 second wait and play hold music to the caller.

---

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)