---
title: "getBaseURI(completionHandler:)"
framework: safariservices
role: symbol
role_heading: Type Method
path: "safariservices/sfsafariextension/getbaseuri(completionhandler:)"
---

# getBaseURI(completionHandler:)

## Declaration

```swift
class func getBaseURI(completionHandler: @escaping @Sendable (URL?) -> Void)
```

```swift
class func baseURI() async -> URL?
```

## 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 baseURI() async -> URL? For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.
