---
title: "getAllWindows(completionHandler:)"
framework: safariservices
role: symbol
role_heading: Type Method
path: "safariservices/sfsafariapplication/getallwindows(completionhandler:)"
---

# getAllWindows(completionHandler:)

## Declaration

```swift
class func getAllWindows(completionHandler: @escaping @Sendable ([SFSafariWindow]) -> Void)
```

```swift
class func allWindows() async -> [SFSafariWindow]
```

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: class func allWindows() async -> [SFSafariWindow] For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Type Methods

- [getHostApplication(completionHandler:)](safariservices/sfsafariapplication/gethostapplication(completionhandler:).md)
