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

# entityIdentifier(_:)

Creates a predicate to match any donation that contains the specified entity in a parameter.

```
static func entityIdentifier(_ identifier: EntityIdentifier) -> IntentDonationMatchingPredicate
```

## Parameters

`identifier`

The identifier for one of your app’s entities. Typically, you find an
entity’s identifier in its `id` property, which you add as part of your implementation
of the <doc://com.apple.documentation/documentation/Swift/Identifiable> protocol.

## Return Value

A predicate that matches a donation if it contains a parameter with the specified entity.

## Discussion

When you delete the data for an entity from your app’s data store, use this method to
remove any donations that refer to that [`AppEntity`](/documentation/AppIntents/AppEntity) instance. This predicate matches
all donations in which the app intent contains a parameter with the specified entity.
Removing those donations prevents the system from suggesting an app intent that your
app can’t run because it doesn’t have the needed data.

---

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)