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

# intentType(_:entityIdentifier:)

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

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

A predicate that matches a donation when app intents of the provided type
contain the entity you specified.

## 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`](/documentation/AppIntents/AppEntity) instance. Remove donations to prevent the system
from suggesting those actions in the future.

---

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)