---
title: "getWithCompletionHandler(_:)"
framework: screencapturekit
role: symbol
role_heading: Type Method
path: "screencapturekit/scshareablecontent/getwithcompletionhandler(_:)"
---

# getWithCompletionHandler(_:)

Retrieves the displays, apps, and windows that your app can capture.

## Declaration

```swift
class func getWithCompletionHandler(_ completionHandler: @escaping @Sendable (SCShareableContent?, (any Error)?) -> Void)
```

```swift
class var current: SCShareableContent { get async throws }
```

## Parameters

- `completionHandler`: A callback the system invokes with the shareable content, or an error if a failure occurs.

## Discussion

Discussion Use this method to retrieve the onscreen content that your app can capture. If the call is successful, the system returns the shareable content to the completion handler; otherwise, it returns an error that describes the failure.

## See Also

### Retrieving shareable content

- [getExcludingDesktopWindows(_:onScreenWindowsOnly:completionHandler:)](screencapturekit/scshareablecontent/getexcludingdesktopwindows(_:onscreenwindowsonly:completionhandler:).md)
- [getExcludingDesktopWindows(_:onScreenWindowsOnlyAbove:completionHandler:)](screencapturekit/scshareablecontent/getexcludingdesktopwindows(_:onscreenwindowsonlyabove:completionhandler:).md)
- [getExcludingDesktopWindows(_:onScreenWindowsOnlyBelow:completionHandler:)](screencapturekit/scshareablecontent/getexcludingdesktopwindows(_:onscreenwindowsonlybelow:completionhandler:).md)
- [info(for:)](screencapturekit/scshareablecontent/info(for:).md)
