<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/AppIntent/callAsFunction(donate:)-7v1om",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents",
      "AppIntents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A6IntentPAAE14callAsFunction6donateySb_tYaKs5NeverO13PerformResult_5ValueRTzrlF"
  },
  "title" : "callAsFunction(donate:)"
}
-->

# callAsFunction(donate:)

Runs the intent’s action after resolving any parameters, and optionally donates the
intent to the system.

```
func callAsFunction(donate donateOnCompletion: Bool = true) async throws where Self.PerformResult.Value == Never
```

## Parameters

`donateOnCompletion`

`true` if you want to donate the intent to the system after performing the action.

## Discussion

Call this method when you want to perform the current app intent’s action. For example,
you might call this method if you use app intents to implement your app’s underlying
features. This method resolves the parameters of the intent and calls its [`perform()`](/documentation/AppIntents/AppIntent/perform()) method.

---

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)