<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSUserActivity/deleteSavedUserActivities(withPersistentIdentifiers:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUserActivity(cm)deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:"
  },
  "title" : "deleteSavedUserActivities(withPersistentIdentifiers:completionHandler:)"
}
-->

# deleteSavedUserActivities(withPersistentIdentifiers:completionHandler:)

Deletes user activities created by your app that have the specified persistent identifiers.

```
class func deleteSavedUserActivities(withPersistentIdentifiers persistentIdentifiers: [NSUserActivityPersistentIdentifier], completionHandler handler: @escaping @Sendable () -> Void)
```

## Parameters

`persistentIdentifiers`

The list of persistent identifiers that the system uses to determine which user activities to delete.

`handler`

The block that the system invokes after deleting the user activities. Wait for the system to call this block to ensure that the system deletes the activities (or marks them for deletion).

## Discussion

Deletes user activities with a persistent identifier matching any identifier in the `persistentIdentifiers` array.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)