Contents

entityIdentifiers(_:)

Creates a predicate that matches donations that refer to one of the specified entities.

Declaration

static func entityIdentifiers(_ identifiers: [EntityIdentifier]) -> IntentDonationMatchingPredicate

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 Identifiable protocol.

Return Value

A predicate that matches a donation if it contains at least one of the specified entities.

Discussion

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.