<!--
{
  "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: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSUserActivity/getContinuationStreams(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUserActivity(im)getContinuationStreamsWithCompletionHandler:"
  },
  "title" : "getContinuationStreams(completionHandler:)"
}
-->

# getContinuationStreams(completionHandler:)

Requests streams back to the originating app.

```
func getContinuationStreams(completionHandler: @escaping @Sendable (InputStream?, OutputStream?, (any Error)?) -> Void)
```

## Parameters

`completionHandler`

The completion handler block that returns streams.

    The block takes three arguments:

- `inputStream`: The stream from which the continuing app can read data written by the originating app.
- `outputStream`: The stream to which the continuing app writes data to be read by the originating app.
- `error`: If successful, `nil`; if not successful, an [`NSError`](/documentation/Foundation/NSError) object that encapsulates the reason why the streams could not be created.

## Discussion

When an app is launched for a continuation event, it can request streams back to the originating app. Streams can be successfully retrieved only from the [`NSUserActivity`](/documentation/Foundation/NSUserActivity) object in the <doc://com.apple.documentation/documentation/AppKit/NSApplication> or <doc://com.apple.documentation/documentation/UIKit/UIApplication> delegate that is called for a continuation event. The streams are provided by the completion handler in an unopened state, and the delegate should open them immediately to start communicating with the continuing side.

Continuation streams are an optional feature of Handoff, and most user activities do not need them for successful continuation. When streams are needed, a simple request from the continuing app accompanied by a response from the originating app is enough for most continuation events.

---

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)