---
title: "entityIdentifier(_:)"
framework: appintents
role: symbol
role_heading: Type Method
path: "appintents/intentdonationmatchingpredicate/entityidentifier(_:)"
---

# entityIdentifier(_:)

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

## Declaration

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

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

## Discussion

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 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.

## See Also

### Creating a predicate

- [donationIdentifier(_:)](appintents/intentdonationmatchingpredicate/donationidentifier(_:).md)
- [intentType(_:entityIdentifier:)](appintents/intentdonationmatchingpredicate/intenttype(_:entityidentifier:).md)
