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

# finishPickerDiscovery(completionHandler:)

Finish the discovery session in the picker and show a timeout error.

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

```
func finishPickerDiscovery() async throws
```

## Parameters

`completionHandler`

A block or closure that executes after this operation completes. The completion handler receives an <doc://com.apple.documentation/documentation/Foundation/NSError> instance if the operation encounters an error.

## Discussion

Use this method if you previously set the picker display setting [`discoveryTimeout`](/documentation/AccessorySetupKit/ASPickerDisplaySettings/discoveryTimeout-swift.property) to [`unbounded`](/documentation/AccessorySetupKit/ASPickerDisplaySettings/DiscoveryTimeout-swift.struct/unbounded) in order to perform manual filtering of discovered accessories.
Calling this method finishes the discovery session in the picker and shows a timeout error if the session didn’t find any desired accessories.

Calling this method after updating the picker with discovered accessories has no effect.

---

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)