<!--
{
  "availability" : [
    "macOS: 13.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/transferWindowSharing(to:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)transferWindowSharingToWindow:completionHandler:"
  },
  "title" : "transferWindowSharing(to:completionHandler:)"
}
-->

# transferWindowSharing(to:completionHandler:)

Attempts to move window sharing (within a SharePlay session) from this window to another window.

```
func transferWindowSharing(to window: NSWindow, completionHandler: @escaping ((any Error)?) -> Void)
```

```
func transferWindowSharing(to window: NSWindow) async throws
```

## Parameters

`window`

Another window to replace this window in representing the user’s current activity.

`completionHandler`

A completion block that is called after the request finishes.

## Discussion

In response to this request, the user may choose to transfer sharing to the new window, or simply stop sharing the content.

---

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)