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

# donate()

Donates the app intent to the system.

```
@discardableResult func donate() -> IntentDonationIdentifier
```

## Return Value

An opaque identifier you can use to manage the donation later using
an [`IntentDonationManager`](/documentation/AppIntents/IntentDonationManager) type.

## Discussion

When someone interacts with your app’s interface, create an app intent for
the interaction and call this method. Donating intents helps the system predict
future actions and improve the overall system experience. Don’t donate app intents
that the system creates and asks you to handle.

Call this method to donate the intent synchronously, which you might do if you’re
not using Swift concurrency. The system ignores any exceptions it encounters
during the donation process.

---

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)