---
title: Deleting Donated Shortcuts
framework: sirikit
role: article
role_heading: Article
path: sirikit/deleting-donated-shortcuts
---

# Deleting Donated Shortcuts

Remove your donations from Siri.

## Overview

Overview If your app donated a shortcut containing information that the user has since deleted, your app should delete the donation. For example, let’s say that a user sends a message to a contact using your messaging app. Your app donates the send message shortcut that includes information about the contact. Later, the user deletes that contact from the app. The app should delete the donations it made that included the contact information. When a user deletes data from an app, they expect the data to be gone for good. This means removing the data from the app as well as from the system—if the system has knowledge of that data. It’s important for your app to honor this unspoken agreement with the user: to maintain privacy and trust at all times. There are other times your app should delete donations; for instance, when your app no longer supports the action. In general, whenever a donation is no longer appropriate for the user, your app should delete the donation. Delete Interaction Donations To delete donations made with interaction objects, use one of the delete class methods on INInteraction (see Deleting Interactions from the System). To delete specific donations, use delete(with:completion:), passing in the list of identifier strings for each interaction to delete. Or use delete(with:completion:), passing in the groupIdentifier string used to group of two or more interactions. If you need to delete all interactions that your app donated—for example, when the user signs out of your app—use deleteAll(completion:). Delete User Activity Donations The method you use to delete a donation made with NSUserActivity depends on how you set up the user activity. Persisted Activities If user activity’s isEligibleForPrediction property is set to true and the persistentIdentifier property is set to a unique string identifying the activity, then: Use deleteSavedUserActivities(withPersistentIdentifiers:completionHandler:), passing in the list of persistent identifiers, to delete individual activities. This method also deletes user activities stored by Core Spotlight that have a matching persistent identifier. Use deleteAllSavedUserActivities(completionHandler:) to delete all activities saved by your app; for example, after the user signs out of your app. This method also deletes all user activities created by your app and stored by Core Spotlight. Spotlight Indexed Activities If the user activity is indexed in Spotlight and the relatedUniqueIdentifier property is set to a unique string identifying the activity, then: Use deleteSearchableItems(withIdentifiers:completionHandler:) to delete specific Spotlight items. Use deleteSearchableItems(withDomainIdentifiers:completionHandler:) to delete Spotlight items grouped by domain identifiers. Use deleteAllSearchableItems(completionHandler:) to delete all searchable items that your app contributed to Spotlight from the index. When you delete a Spotlight item, the system deletes the related user activity and its donations. For more information about Spotlight indexing, see Core Spotlight.

## See Also

### Articles

- [Adding User Interactivity with Siri Shortcuts and the Shortcuts App](sirikit/adding-user-interactivity-with-siri-shortcuts-and-the-shortcuts-app.md)
- [Defining Relevant Shortcuts for the Siri Watch Face](sirikit/defining-relevant-shortcuts-for-the-siri-watch-face.md)
- [Dispatching intents to handlers](sirikit/dispatching-intents-to-handlers.md)
- [Improving Siri Media Interactions and App Selection](sirikit/improving-siri-media-interactions-and-app-selection.md)
- [Improving interactions between Siri and your messaging app](sirikit/improving-interactions-between-siri-and-your-messaging-app.md)
- [Registering Custom Vocabulary with SiriKit](sirikit/registering-custom-vocabulary-with-sirikit.md)
- [Confirming the Details of an Intent](sirikit/confirming-the-details-of-an-intent.md)
- [Handling an Intent](sirikit/handling-an-intent.md)
- [Resolving the Parameters of an Intent](sirikit/resolving-the-parameters-of-an-intent.md)
- [Generating a List of Ride Options](sirikit/generating-a-list-of-ride-options.md)
- [Handling the Ride-Booking Intents](sirikit/handling-the-ride-booking-intents.md)
- [Donating Reservations](sirikit/donating-reservations.md)
- [Specifying Synonyms for Your App Name](sirikit/specifying-synonyms-for-your-app-name.md)
- [Intent Phrases](sirikit/intent-phrases.md)
- [Localizing Your Vocabulary for Chinese Dialects](sirikit/localizing-your-vocabulary-for-chinese-dialects.md)
