<!--
{
  "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/IntentDonationManager/donate(intent:result:)-7ztce",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents21IntentDonationManagerV6donate6intent6resultAA0cD10IdentifierVx_q_tAA0aC0RzAA0C6ResultR_r0_lF"
  },
  "title" : "donate(intent:result:)"
}
-->

# donate(intent:result:)

Donates the specified app intent and result to the system synchronously.

```
@discardableResult func donate(intent: some AppIntent, result: some IntentResult) -> IntentDonationIdentifier
```

## Parameters

`intent`

An app intent for an action your app performed. Put enough information
into the app intent that your app can replicate the action later.

`result`

A significant result to the action. For example, specify a result that
triggers a follow-up app intent.

## Return Value

A unique identifier you can use to refer to the donation later. The method
returns this value whether the donation succeeds or fails.

## Discussion

When someone completes an action in your app, call this method to donate a matching app
intent and result. The system doesn’t run the app intent you provide, but uses the
information to predict future actions. If an error occurs during the donation process,
this method ignores the error.

---

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)