Contents

addServiceGroup(withName:completionHandler:)

Adds a service group to the home.

Declaration

func addServiceGroup(withName serviceGroupName: String, completionHandler completion: @escaping  @Sendable (HMServiceGroup?, (any Error)?) -> Void)
func addServiceGroup(named serviceGroupName: String) async throws -> HMServiceGroup

Parameters

  • serviceGroupName:

    The name of the new service group. Must not be nil, and must not be the name of a service group already in the home.

  • completion:

    The block executed after the request is processed.

    group

    The newly created service group.

    error

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

See Also

Grouping services