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

# intentType(_:entityIdentifier:)

Creates a predicate to match app intents of the specified type that optionally refers to a specific entity.

## Declaration

```swift
static func intentType(_ intentType: any AppIntent.Type, entityIdentifier: EntityIdentifier? = nil) -> IntentDonationMatchingPredicate
```

## Parameters

- `intentType`: The app intent type to match against.
- `entityIdentifier`: 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 when app intents of the provided type contain the entity you specified.

## Discussion

Discussion Use this method to delete all donations with a specific type of app intent. Include a value in the entityIdentifier parameter to limit the deletions to those that also reference a specific AppEntity instance. Remove donations to prevent the system from suggesting those actions in the future.

## See Also

### Creating a predicate

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