intentType(_:entityIdentifier:)
Creates a predicate to match app intents of the specified type that optionally refers to a specific entity.
Declaration
static func intentType(_ intentType: any AppIntent.Type, entityIdentifier: EntityIdentifier? = nil) -> IntentDonationMatchingPredicateParameters
- 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
idproperty, which you add as part of your implementation of the 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 instance. Remove donations to prevent the system from suggesting those actions in the future.