<!--
{
  "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/IntentDonationMatchingPredicate/donationIdentifier(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents31IntentDonationMatchingPredicateV18donationIdentifieryAcA0cdH0VFZ"
  },
  "title" : "donationIdentifier(_:)"
}
-->

# donationIdentifier(_:)

Creates a predicate that matches a single, previous donation.

```
static func donationIdentifier(_ identifier: IntentDonationIdentifier) -> IntentDonationMatchingPredicate
```

## Parameters

`identifier`

A donation identifier you received after donating an app intent.

## Return Value

A predicate that matches the specified donation.

## Discussion

When you donate an app intent using the methods of [`IntentDonationManager`](/documentation/AppIntents/IntentDonationManager), the method
returns a unique identifier for that donation. Use this method to create a predicate
that matches only the donation you specified.

---

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)