Instance Method

servicesWithTypes:

Returns an array of all services provided by accessories in the home that match the specified types.

Declaration

- (NSArray<HMService *> *)servicesWithTypes:(NSArray<NSString *> *)serviceTypes;

Parameters

serviceTypes

An array of strings that identify service types. See Accessory Service Types for a list of types.

Return Value

An array of found services. Returns nil if no matching services are found.

See Also

Grouping Services

serviceGroups

An array of all service groups in the home.

- addServiceGroupWithName:completionHandler:

Adds a service group to the home.

- removeServiceGroup:completionHandler:

Removes a service group from the home.

HMServiceGroup

A collection of accessory services.