Contents

updatePicker(showing:completionHandler:)

Updates the picker with app-filtered accessories.

Declaration

func updatePicker(showing displayItems: [ASDiscoveredDisplayItem], completionHandler: @escaping  @Sendable ((any Error)?) -> Void)
func updatePicker(showing displayItems: [ASDiscoveredDisplayItem]) async throws

Parameters

  • displayItems:

    The app-filtered accessories to show in the picker.

  • completionHandler:

    A block or closure that executes after the updatePicker operation completes. The completion handler receives an Nserror instance if the operation encounters an error.

Mentioned in

Discussion

You use this method when your picker uses the filterDiscoveryResults option to enable manual filtering of discovered accessories. After creating customized ASDiscoveredDisplayItem instances for included accessories, call this method to update the picker to show your app-filtered accessories with updated assets.