One Logo Pool Ball
AppIntents · IOS API REFERENCE

IntentDonationMatchingPredicate

struct · iOS 16.0+ · SDK 27.1

struct IntentDonationMatchingPredicate

A type you use to specify previously donated app intents. An `IntentDonationMatchingPredicate` matches one or more app intent donations you made previously. Use this type to specify the donations you plan to delete using the ``IntentDonationManager/deleteDonations(matching:)`` method of ``IntentDonationManager``. You can create predicates to match donations with specific identifiers, or to match donations that contain specific app intents or entities. For example, if someone deletes data in your app, you can create a predicate to remove donations that refer to that data.

Members (4)

static · iOS 16.0+

entityIdentifier

TypeScript
static entityIdentifier(identifier: EntityIdentifier): IntentDonationMatchingPredicate
Swift declaration
static func entityIdentifier(_ identifier: EntityIdentifier) -> IntentDonationMatchingPredicate

Creates a predicate to match any donation that contains the specified entity in a parameter. - 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. - Returns: A predicate that matches a donation if it contains a parameter with the specified entity. 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.

static · iOS 26.4+

entityIdentifiers

TypeScript
static entityIdentifiers(identifiers: Array<EntityIdentifier>): IntentDonationMatchingPredicate
Swift declaration
static func entityIdentifiers(_ identifiers: [EntityIdentifier]) -> IntentDonationMatchingPredicate

Creates a predicate that matches donations that refer to one of the specified entities. - Parameters: - identifiers: An array of identifiers for 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. - Returns: A predicate that matches a donation if it contains at least one of the specified entities. When you delete the data for multiple entities from your app's data store, use this method to remove donations that refer to one of those ``AppEntity`` instances. This predicate matches all donations in which the app intent contains a parameter with one of the specified entities. 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.

static · iOS 16.0+

donationIdentifier

TypeScript
static donationIdentifier(identifier: IntentDonationIdentifier): IntentDonationMatchingPredicate
Swift declaration
static func donationIdentifier(_ identifier: IntentDonationIdentifier) -> IntentDonationMatchingPredicate

Creates a predicate that matches a single, previous donation. - Parameters: - identifier: A donation identifier you received after donating an app intent. - Returns: A predicate that matches the specified donation. When you donate an app intent using the methods of ``IntentDonationManager``, the method returns a unique identifier for that donation. Use this method to create a predicate that matches only the donation you specified.

static · iOS 26.4+

donationIdentifiers

TypeScript
static donationIdentifiers(identifiers: Array<IntentDonationIdentifier>): IntentDonationMatchingPredicate
Swift declaration
static func donationIdentifiers(_ identifiers: [IntentDonationIdentifier]) -> IntentDonationMatchingPredicate

Creates a predicate that matches one or more previous donations. - Parameters: - identifiers: An array of donation identifiers you received after donating app intents. - Returns: A predicate that matches the specified donations. When you donate an app intent using the methods of ``IntentDonationManager``, the method returns a unique identifier for that donation. Use this method to create a predicate that matches all of the donations you specified.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

IntentDonationMatchingPredicate.intentType(_:entityIdentifier:)

Passing a Swift type itself is not supported.

All AppIntents types →