Contents

performAccessorySetup(using:completionHandler:)

Performs the process of setting up accessories with Apple Home.

Declaration

func performAccessorySetup(using request: HMAccessorySetupRequest, completionHandler completion: @escaping  @Sendable (HMAccessorySetupResult?, (any Error)?) -> Void)
func performAccessorySetup(using request: HMAccessorySetupRequest) async throws -> HMAccessorySetupResult

Parameters

  • request:

    The accessory setup request.

  • completion:

    A block that the framework invokes once the setup process completes.

Discussion

During the setup process, the framework adds each accessory to a home, assigns it to a room, and provides further configuration based on its services.