entityIdentifier(_:)
Creates a predicate to match any donation that contains the specified entity in a parameter.
Declaration
static func entityIdentifier(_ identifier: EntityIdentifier) -> IntentDonationMatchingPredicateParameters
- identifier:
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 if it contains a parameter with the specified entity.
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.