<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AccessorySetupKit",
  "identifier" : "/documentation/AccessorySetupKit/ASAccessorySession/showPicker(for:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AccessorySetupKit"
    ],
    "preciseIdentifier" : "c:objc(cs)ASAccessorySession(im)showPickerForDisplayItems:completionHandler:"
  },
  "title" : "showPicker(for:completionHandler:)"
}
-->

# showPicker(for:completionHandler:)

Present a picker that shows discovered accessories matching an array of display items.

```
func showPicker(for displayItems: [ASPickerDisplayItem], completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

## Parameters

`displayItems`

An array of [`ASPickerDisplayItem`](/documentation/AccessorySetupKit/ASPickerDisplayItem) instances describing accessories your app can set up. The picker displays only discovered accessories that match the properties of items in this array.

`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

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.

To migrate previously-configured accessories to AccessorySetupKit, add instances of [`ASMigrationDisplayItem`](/documentation/AccessorySetupKit/ASMigrationDisplayItem) to the `displayItems` array.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)