---
title: "callAsFunction(donate:)"
framework: appintents
role: symbol
role_heading: Instance Method
path: "appintents/appintent/callasfunction(donate:)-7v1om"
---

# callAsFunction(donate:)

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

## Declaration

```swift
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

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() method.

## See Also

### Donating the intent to the system

- [donate()](appintents/appintent/donate()-1e60c.md)
- [donate()](appintents/appintent/donate()-jp6k.md)
- [donate(result:)](appintents/appintent/donate(result:)-36cia.md)
- [donate(result:)](appintents/appintent/donate(result:)-9b25i.md)
- [callAsFunction(donate:)](appintents/appintent/callasfunction(donate:)-3qvbt.md)
