Contents

configureAccessory(_:withConfigurationUIOn:)

Begins the configuration process for the specified accessory.

Declaration

func configureAccessory(_ accessory: EAWiFiUnconfiguredAccessory, withConfigurationUIOn viewController: UIViewController)

Parameters

  • accessory:

    The accessory the app is configuring.

  • viewController:

    The view controller that will host the system-provided setup UI in the app. Typically, viewController is the same view controller the app is using to present its user interface at the time it calls this method.

Discussion

This method stops the search for unconfigured accessories and begins the configuration process of the specified accessory. To guide the user through the configuration process (which can take up to a few minutes to complete), the system displays a modal setup UI on top of the specified view controller. Upon completion of the process, the host app’s delegate receives the accessoryBrowser:didFinishConfiguringAccessory:withError: callback with a status value that it can check. For example, an app might want to tell the user if the configuration failed.

See Also

Finding and Configuring Accessories