One Logo Pool Ball
HomeKit · IOS API REFERENCE

HMHome

class · iOS 8.0+ · SDK 27.1

class HMHome

Members (43)

method

addAccessory

TypeScript
addAccessory(accessory: HMAccessory, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func addAccessory(_ accessory: HMAccessory) async throws
method

addActionSet

TypeScript
addActionSet(actionSetName: string, completion: ((arg0: (HMActionSet) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func addActionSet(named actionSetName: String) async throws -> HMActionSet
method · iOS 10.0+ · Deprecated in iOS 15.4

addAndSetupAccessories

TypeScript
addAndSetupAccessoriesCompletionHandler(completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func addAndSetUpAccessories() async throws
method · iOS 11.3+ · Deprecated in iOS 15.0

addAndSetupAccessories

TypeScript
addAndSetupAccessoriesWithCompletionHandler(payload: HMAccessorySetupPayload, completion: ((arg0: (Array<HMAccessory>) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func addAndSetUpAccessories(payload: HMAccessorySetupPayload) async throws -> [HMAccessory]
method

addRoom

TypeScript
addRoom(roomName: string, completion: ((arg0: (HMRoom) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func addRoom(named roomName: String) async throws -> HMRoom
method

addServiceGroup

TypeScript
addServiceGroup(serviceGroupName: string, completion: ((arg0: (HMServiceGroup) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func addServiceGroup(named serviceGroupName: String) async throws -> HMServiceGroup
method

addTrigger

TypeScript
addTrigger(trigger: HMTrigger, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func addTrigger(_ trigger: HMTrigger) async throws
method · iOS 8.0+ · Deprecated in iOS 9.0

addUser

TypeScript
addUser(completion: ((arg0: (HMUser) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func addUser(completionHandler completion: @escaping @Sendable (HMUser?, (any Error)?) -> Void)
method

addZone

TypeScript
addZone(zoneName: string, completion: ((arg0: (HMZone) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func addZone(named zoneName: String) async throws -> HMZone
method

assignAccessory

TypeScript
assignAccessory(accessory: HMAccessory, room: HMRoom, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func assignAccessory(_ accessory: HMAccessory, to room: HMRoom) async throws
method · iOS 9.0+

builtinActionSet

TypeScript
builtinActionSet(actionSetType: string): (HMActionSet) | null
Swift declaration
func builtinActionSet(ofType actionSetType: String) -> HMActionSet?
method

executeActionSet

TypeScript
executeActionSet(actionSet: HMActionSet, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func executeActionSet(_ actionSet: HMActionSet) async throws
method · iOS 9.0+

homeAccessControl

TypeScript
homeAccessControl(user: HMUser): HMHomeAccessControl
Swift declaration
func homeAccessControl(for user: HMUser) -> HMHomeAccessControl
method · iOS 9.0+

manageUsers

TypeScript
manageUsers(completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func manageUsers() async throws
method

removeAccessory

TypeScript
removeAccessory(accessory: HMAccessory, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func removeAccessory(_ accessory: HMAccessory) async throws
method

removeActionSet

TypeScript
removeActionSet(actionSet: HMActionSet, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func removeActionSet(_ actionSet: HMActionSet) async throws
method

removeRoom

TypeScript
removeRoom(room: HMRoom, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func removeRoom(_ room: HMRoom) async throws
method

removeServiceGroup

TypeScript
removeServiceGroup(group: HMServiceGroup, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func removeServiceGroup(_ group: HMServiceGroup) async throws
method

removeTrigger

TypeScript
removeTrigger(trigger: HMTrigger, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func removeTrigger(_ trigger: HMTrigger) async throws
method · iOS 8.0+ · Deprecated in iOS 9.0

removeUser

TypeScript
removeUser(user: HMUser, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func removeUser(_ user: HMUser, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
method

removeZone

TypeScript
removeZone(zone: HMZone, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func removeZone(_ zone: HMZone) async throws
method

roomForEntireHome

TypeScript
roomForEntireHome(): HMRoom
Swift declaration
func roomForEntireHome() -> HMRoom
method

servicesWithTypes

TypeScript
servicesWithTypes(serviceTypes: Array<string>): (Array<HMService>) | null
Swift declaration
func servicesWithTypes(_ serviceTypes: [String]) -> [HMService]?
method

unblockAccessory

TypeScript
unblockAccessory(accessory: HMAccessory, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func unblockAccessory(_ accessory: HMAccessory) async throws
method · iOS 8.0+

updateName

TypeScript
updateName(name: string, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func updateName(_ name: String) async throws
get

accessories

TypeScript
get accessories(): Array<HMAccessory>
Swift declaration
var accessories: [HMAccessory] { get }
get

actionSets

TypeScript
get actionSets(): Array<HMActionSet>
Swift declaration
var actionSets: [HMActionSet] { get }
get · iOS 9.0+

currentUser

TypeScript
get currentUser(): HMUser
Swift declaration
var currentUser: HMUser { get }
get · iOS 8.0+

delegate

TypeScript
get delegate(): (SDKHandle) | null
Swift declaration
weak var delegate: (any HMHomeDelegate)? { get set }
set · iOS 8.0+

delegate

TypeScript
set delegate(value: (Implements<HMHomeDelegate> | SDKHandle) | null)
Swift declaration
weak var delegate: (any HMHomeDelegate)? { get set }
get · iOS 11.0+

homeHubState

TypeScript
get homeHubState(): HMHomeHubState
Swift declaration
var homeHubState: HMHomeHubState { get }
get · iOS 16.1+

matterControllerID

TypeScript
get matterControllerID(): string
Swift declaration
var matterControllerID: String { get }
get · iOS 16.1+

matterControllerXPCConnectBlock

TypeScript
get matterControllerXPCConnectBlock(): (() => Promise<_Foundation_NSXPCConnection>)
Swift declaration
var matterControllerXPCConnectBlock: () -> NSXPCConnection { get }
get · iOS 18.2+

matterStartupParametersXPCConnectBlock

TypeScript
get matterStartupParametersXPCConnectBlock(): (() => Promise<_Foundation_NSXPCConnection>)
Swift declaration
var matterStartupParametersXPCConnectBlock: () -> NSXPCConnection { get }
get · iOS 8.0+

name

TypeScript
get name(): string
Swift declaration
var name: String { get }
get · iOS 8.0+

isPrimary

TypeScript
get isPrimary(): boolean
Swift declaration
var isPrimary: Bool { get }
get

rooms

TypeScript
get rooms(): Array<HMRoom>
Swift declaration
var rooms: [HMRoom] { get }
get

serviceGroups

TypeScript
get serviceGroups(): Array<HMServiceGroup>
Swift declaration
var serviceGroups: [HMServiceGroup] { get }
get · iOS 13.2+

supportsAddingNetworkRouter

TypeScript
get supportsAddingNetworkRouter(): boolean
Swift declaration
var supportsAddingNetworkRouter: Bool { get }
get

triggers

TypeScript
get triggers(): Array<HMTrigger>
Swift declaration
var triggers: [HMTrigger] { get }
get · iOS 9.0+

uniqueIdentifier

TypeScript
get uniqueIdentifier(): string
Swift declaration
var uniqueIdentifier: UUID { get }
get · iOS 8.0+ · Deprecated in iOS 9.0

users

TypeScript
get users(): Array<HMUser>
Swift declaration
var users: [HMUser] { get }
get

zones

TypeScript
get zones(): Array<HMZone>
Swift declaration
var zones: [HMZone] { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

HMHome.init()

inherited init: clang: 'init' is unavailable

All HomeKit types →