Contents

addHome(withName:completionHandler:)

Adds a new home to this home manager.

Declaration

func addHome(withName homeName: String, completionHandler completion: @escaping  @Sendable (HMHome?, (any Error)?) -> Void)
func addHome(named homeName: String) async throws -> HMHome

Parameters

  • homeName:

    The name of the new home. Must not match the name of an existing home.

  • completion:

    The block executed after the request is processed.

    home

    The newly created home; may be nil if creation failed.

    error

    nil on success; otherwise, error object indicating the reason for failure.

See Also

Adding and removing homes