---
title: "showPicker(completionHandler:)"
framework: accessorysetupkit
role: symbol
role_heading: Instance Method
path: "accessorysetupkit/asaccessorysession/showpicker(completionhandler:)"
---

# showPicker(completionHandler:)

Present a picker that shows accessories managed by a Device Discovery Extension in your app.

## Declaration

```swift
func showPicker(completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func showPicker() async throws
```

## Parameters

- `completionHandler`: A block or closure that the picker calls when it completes the operation. The completion handler receives an doc://com.apple.documentation/documentation/Foundation/NSError instance if the picker encounters an error.

## Discussion

Discussion Use this method when your app includes a DeviceDiscoveryExtension for its supported accessories. If your app doesn’t use DDE, call showPicker(for:completionHandler:) with an array of ASPickerDisplayItem instances instead. The session’s event handler receives events when this picker displays and dismisses, as well as when the person using the app picks an accessory.

## See Also

### Displaying an accessory picker

- [showPicker(for:completionHandler:)](accessorysetupkit/asaccessorysession/showpicker(for:completionhandler:).md)
