<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSUserActivityDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSUserActivityDelegate"
  },
  "title" : "NSUserActivityDelegate"
}
-->

# NSUserActivityDelegate

The interface through which a user activity instance notifies its delegate of updates.

```
protocol NSUserActivityDelegate : NSObjectProtocol
```

## Overview

An object conforming to the [`NSUserActivityDelegate`](/documentation/Foundation/NSUserActivityDelegate) protocol works with an [`NSUserActivity`](/documentation/Foundation/NSUserActivity) object, which encapsulates the state of a user activity in an application on a particular device and enables the same activity to be continued on another device. For example, a user browsing an article in Safari on a Mac can move to an iOS device where the same webpage automatically opens in Safari with the same scroll position.

The user activity delegate is responsible for updating the state of an activity and is also notified when an activity has been continued on another device. The user activity delegate is typically a top-level object in the app—such as a window, view controller, or the app delegate—that manages the activity’s interaction with the app.

## Topics

### Handling streams

[`-  userActivity:didReceiveInputStream:outputStream:`](/documentation/Foundation/NSUserActivityDelegate/userActivity(_:didReceive:outputStream:))

Notifies the user activity delegate that an input and output streams are available to open.

### Managing activity continuation

[`-  userActivityWasContinued:`](/documentation/Foundation/NSUserActivityDelegate/userActivityWasContinued(_:))

Notifies the delegate that the user activity was continued on another device.

[`-  userActivityWillSave:`](/documentation/Foundation/NSUserActivityDelegate/userActivityWillSave(_:))

Notifies the delegate that the user activity will be saved to be continued or persisted.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)