---
title: "showPreferencesForExtension(withIdentifier:completionHandler:)"
framework: safariservices
role: symbol
role_heading: Type Method
path: "safariservices/sfsafariapplication/showpreferencesforextension(withidentifier:completionhandler:)"
---

# showPreferencesForExtension(withIdentifier:completionHandler:)

Launches Safari and opens the preferences panel for a Safari app extension.

## Declaration

```swift
class func showPreferencesForExtension(withIdentifier identifier: String, completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)
```

```swift
class func showPreferencesForExtension(withIdentifier identifier: String) async throws
```

## Parameters

- `identifier`: The identifier for a Safari app extension in your app bundle.
- `completionHandler`: A completion handler called after the operation completes. The completion handler takes the following parameter:

## 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 showPreferencesForExtension(withIdentifier identifier: String) async throws For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Working with Windows

- [getActiveWindow(completionHandler:)](safariservices/sfsafariapplication/getactivewindow(completionhandler:).md)
- [openWindow(with:completionHandler:)](safariservices/sfsafariapplication/openwindow(with:completionhandler:).md)
