TechnologiesDevice, Sensors & Hardware

HomeKit

iOSmacOStvOSwatchOSvisionOS

HomeKit discovers, configures, and controls home-automation accessories across iOS, tvOS, watchOS, and visionOS. You browse for accessories with HMAccessoryBrowser and represent each one as an HMAccessory exposing its HMAccessoryProfile, HMService, and HMCharacteristic values, then read and write characteristics such as security-system, lock, leak, and air-quality states. To automate a home, you compose HMAction and HMActionSet collections and schedule them with triggers built from events like HMCalendarEvent. For camera accessories, types including HMCameraProfile, HMCameraStream, HMCameraSnapshot, and HMCameraView let you control audio, capture snapshots, and present live video streams.

Home Management 4

Discover the user's homes and manage authorization to control them.

  • Cl
    HMHomeManageriOS 8.0+
    @abstract Manages collection of one or more homes.
  • Pr
    HMHomeManagerDelegateiOS 8.0+
    @abstract This delegate receives updates on homes being managed via the home manager.
  • St
    HMHomeManagerAuthorizationStatusiOS 13.0+
    @abstract The home data authorization status of the client process.
  • En
    HMHomeHubStateiOS 11.0+
    @enum HMHomeHubState

Homes, Rooms, and Zones 5

Represent a home and organize its accessories into rooms, zones, and service groups.

  • Cl
    HMHomeiOS 8.0+
    @brief Represents a home.
  • Pr
    HMHomeDelegateiOS 8.0+
    @brief This delegate receives update on the various accessories, action sets, groups and triggers
  • Cl
    HMRoomiOS 8.0+
    @brief This class describes a room in the home.
  • Cl
    HMZoneiOS 8.0+
    @brief Used to describe a collection of HMRoom objects
  • Cl
    HMServiceGroupiOS 8.0+
    @abstract Used to describe a collection of HMService objects

Discovering and Adding Accessories 6

Browse for new accessories and add them to a home with setup payloads and ownership tokens.

  • Cl
    HMAccessoryBrowseriOS 8.0+
    @brief This class is used to discover new accessories in the home
  • Pr
    HMAccessoryBrowserDelegateiOS 8.0+
    @brief This delegate receives updates about new accessories in the home.
  • Cl
    HMAddAccessoryRequest
    An object that describes a request to add a specific accessory to a home.
  • Cl
    HMAccessorySetupPayloadiOS 11.3+
    An object that carries the configuration data needed to set up and add an accessory.
  • Cl
    HMAccessoryOwnershipTokeniOS 13.0+
    An object that represents proof of ownership used when adding an accessory to a home.
  • Cl
    HMAccessoryCategoryiOS 9.0+
    @brief This class is used to represent an accessory category.

Accessories and Profiles 5

Work with installed accessories and the profiles that describe their feature areas.

  • Cl
    HMAccessoryiOS 8.0+
    @abstract Represent an accessory in the home.
  • Pr
    HMAccessoryDelegateiOS 8.0+
    @brief This defines the protocol for a delegate to receive updates about
  • Cl
    HMAccessoryProfileiOS 10.0+
    @abstract Represents a profile implemented by an accessory.
  • Cl
    HMNetworkConfigurationProfileiOS 13.0+
    A profile that manages the network access settings of a HomeKit-enabled router.
  • Pr
    HMNetworkConfigurationProfileDelegateiOS 13.0+
    A protocol for responding to changes in a router accessory's network configuration.

Services and Characteristics 4

Read and write the services and characteristics that expose an accessory's state and metadata.

  • Cl
    HMServiceiOS 8.0+
    @brief Represents a service provided by an accessory.
  • Cl
    HMCharacteristiciOS 8.0+
    @brief Represent a characteristic on a service of an accessory.
  • Cl
    HMCharacteristicMetadataiOS 8.0+
    @brief This class defines the metadata for a characteristic. Metadata provides
  • Cl
    HMNumberRangeiOS 11.0+
    @brief This class describes a range of numbers: [min, max]

Actions and Action Sets 3

Group characteristic writes into reusable actions and scenes that can be triggered together.

  • Cl
    HMActioniOS 8.0+
    @brief This class is used to represent a generic action.
  • Cl
    HMActionSetiOS 8.0+
    @brief This class represents a collection of action objects that can be executed.
  • Cl
    HMCharacteristicWriteActioniOS 8.0+
    @brief This class is used to represent an entry in an action set that writes a specific

Triggers 4

Automate a home by firing action sets in response to time, events, or conditions.

  • Cl
    HMTriggeriOS 8.0+
    @brief Represents a trigger event.
  • Cl
    HMTimerTriggeriOS 8.0+
    @brief Timer based trigger.
  • Cl
    HMEventTriggeriOS 9.0+
    @brief Triggers based on events.
  • En
    HMEventTriggerActivationStateiOS 11.0+
    @abstract This enumeration describes the current activation state of the event trigger.

Events 17

Define the time, characteristic, presence, and duration conditions that drive event triggers.

  • Cl
    HMEventiOS 9.0+
    @brief This class is used to represent a generic HomeKit event.
  • Cl
    HMTimeEventiOS 11.0+
    @brief This class is used to represent a generic time event.
  • Cl
    HMCalendarEventiOS 11.0+
    @brief A calendar event which fires at an absolute time. It can also be used to set up a recurring events which will fire at a scheduled time.
  • Cl
    HMMutableCalendarEventiOS 11.0+
    @brief This class is used to represent a calendar event.
  • Cl
    HMSignificantTimeEventiOS 11.0+
    @brief This class is used to represent a significant time event.
  • Cl
    HMMutableSignificantTimeEventiOS 11.0+
    @brief This class is used to represent a significant time event.
  • St
    HMSignificantEvent
    @brief Type corresponding to significant events.
  • Cl
    HMCharacteristicEventiOS 9.0+
    @brief This class represents an event that is evaluated based on the value of a characteristic
  • Cl
    HMMutableCharacteristicEventiOS 11.0+
    @brief This class represents an event that is evaluated based on the value of a characteristic
  • Cl
    HMCharacteristicThresholdRangeEventiOS 11.0+
    @brief This class represents an event when a characteristic's value falls within the specified
  • Cl
    HMMutableCharacteristicThresholdRangeEventiOS 11.0+
    @brief This class represents an event when a characteristic's value falls within the specified
  • Cl
    HMDurationEventiOS 11.0+
    @brief This class is used to represent a duration of time.
  • Cl
    HMMutableDurationEventiOS 11.0+
    @brief This class is used to represent a duration of time.
  • Cl
    HMPresenceEventiOS 11.0+
    @brief This class is used to represent the presence of users in a home.
  • Cl
    HMMutablePresenceEventiOS 11.0+
    @brief This class is used to represent the presence of users in a home.
  • En
    HMPresenceEventTypeiOS 11.0+
    @abstract This enumeration describes the different types of presence events.
  • En
    HMPresenceEventUserTypeiOS 11.0+
    @abstract This enumeration describes the different types of user sets in presence events.

Cameras and Video 14

Control camera accessories to capture snapshots and present live audio and video streams.

  • Cl
    HMCameraProfileiOS 10.0+
    @abstract Represents a camera profile the accessory implements.
  • Cl
    HMCameraControliOS 10.0+
    @abstract Represents a generic camera control.
  • Cl
    HMCameraSourceiOS 10.0+
    @brief Abstract class for source of data from a camera.
  • Cl
    HMCameraViewiOS 10.0+
    @abstract This view can render a camera source.
  • Cl
    HMCameraStreamiOS 10.0+
    @abstract Represents a camera stream.
  • Cl
    HMCameraStreamControliOS 10.0+
    @abstract This class can be used to control the stream from a camera.
  • Pr
    HMCameraStreamControlDelegateiOS 10.0+
    @brief This delegate receives updates on the camera stream.
  • En
    HMCameraStreamStateiOS 10.0+
    @abstract This enumeration describes the different states of a camera stream.
  • Cl
    HMCameraSnapshotiOS 10.0+
    @abstract Represents a camera snapshot.
  • Cl
    HMCameraSnapshotControliOS 10.0+
    @abstract This class can be used to take an image snapshot from a camera.
  • Pr
    HMCameraSnapshotControlDelegateiOS 10.0+
    @brief This delegate receives updates on the camera snapshot.
  • Cl
    HMCameraAudioControliOS 10.0+
    An object that controls audio settings, such as muting, for a camera accessory.
  • En
    HMCameraAudioStreamSettingiOS 10.0+
    @abstract This enumeration describes the setting for audio on the recipient of the camera stream.
  • Cl
    HMCameraSettingsControliOS 10.0+
    @abstract This class can be used to control the settings on a camera.

Users and Access Control 3

Manage the people who share a home and the privileges they hold.

  • Cl
    HMUseriOS 8.0+
    @brief This class describes a user in the home.
  • Cl
    HMAccessControliOS 11.2+
    @abstract The HMAccessControl class represents a generic access control.
  • Cl
    HMHomeAccessControliOS 9.0+
    @brief Represents the access control of a user associated with a home.

Security and Locks 13

Constants describing the state of security systems, locks, doors, and physical controls.

  • En
    HMCharacteristicValueCurrentSecuritySystemStateiOS 9.0+
    @enum HMCharacteristicValueCurrentSecuritySystemState
  • En
    HMCharacteristicValueTargetSecuritySystemStateiOS 9.0+
    @enum HMCharacteristicValueTargetSecuritySystemState
  • En
    HMCharacteristicValueSecuritySystemAlarmTypeiOS 10.0+
    @enum HMCharacteristicValueSecuritySystemAlarmType
  • En
    HMCharacteristicValueLockMechanismStateiOS 8.0+
    @enum HMCharacteristicValueLockMechanismState
  • En
    HMCharacteristicValueTargetLockMechanismStateiOS 8.0+
    @enum HMCharacteristicValueTargetLockMechanismState
  • En
    HMCharacteristicValueLockMechanismLastKnownActioniOS 8.0+
    @enum HMCharacteristicValueLockMechanismLastKnownAction
  • En
    HMCharacteristicValueLockPhysicalControlsStateiOS 10.2+
    @enum HMCharacteristicValueLockPhysicalControlsState
  • En
    HMCharacteristicValueJammedStatusiOS 10.0+
    @enum HMCharacteristicValueJammedStatus
  • En
    HMCharacteristicValueTamperedStatusiOS 10.0+
    @enum HMCharacteristicValueTamperStatus
  • En
    HMCharacteristicValueDoorStateiOS 8.0+
    @enum HMCharacteristicValueDoorState
  • En
    HMCharacteristicValueTargetDoorStateiOS 8.0+
    @enum HMCharacteristicValueTargetDoorState
  • En
    HMCharacteristicValueContactStateiOS 10.0+
    @enum HMCharacteristicValueContactState
  • En
    HMCharacteristicValuePositionStateiOS 9.0+
    @enum HMCharacteristicValuePositionState

Sensors and Safety 10

Constants reporting readings from air-quality, leak, smoke, gas, occupancy, and battery sensors.

  • En
    HMCharacteristicValueAirQualityiOS 9.0+
    @enum HMCharacteristicValueAirQuality
  • En
    HMCharacteristicValueAirParticulateSizeiOS 9.0+
    @enum HMCharacteristicValueAirParticulateSize
  • En
    HMCharacteristicValueLeakStatusiOS 10.0+
    @enum HMCharacteristicValueLeakDetectionStatus
  • En
    HMCharacteristicValueSmokeDetectionStatusiOS 10.0+
    @enum HMCharacteristicValueSmokeDetectionStatus
  • En
    HMCharacteristicValueCarbonMonoxideDetectionStatusiOS 10.0+
    @enum HMCharacteristicValueCarbonMonoxideDetectionStatus
  • En
    HMCharacteristicValueCarbonDioxideDetectionStatusiOS 10.0+
    @enum HMCharacteristicValueCarbonDioxideDetectionStatus
  • En
    HMCharacteristicValueOccupancyStatusiOS 10.0+
    @enum HMCharacteristicValueOccupancyStatus
  • En
    HMCharacteristicValueStatusFaultiOS 10.0+
    @enum HMCharacteristicValueStatusFault
  • En
    HMCharacteristicValueBatteryStatusiOS 10.0+
    @enum HMCharacteristicValueBatteryStatus
  • En
    HMCharacteristicValueChargingStateiOS 10.0+
    @enum HMCharacteristicValueChargingState

Climate and Air 15

Constants describing heating, cooling, humidity, fans, air purifiers, and related settings.

  • En
    HMCharacteristicValueCurrentHeatingCoolingiOS 8.0+
    @enum HMCharacteristicValueCurrentHeatingCooling
  • En
    HMCharacteristicValueHeatingCoolingiOS 8.0+
    @enum HMCharacteristicValueHeatingCooling
  • En
    HMCharacteristicValueCurrentHeaterCoolerStateiOS 10.2+
    @enum HMCharacteristicValueCurrentHeaterCoolerState
  • En
    HMCharacteristicValueTargetHeaterCoolerStateiOS 10.2+
    @enum HMCharacteristicValueTargetHeaterCoolerState
  • En
    HMCharacteristicValueCurrentHumidifierDehumidifierStateiOS 10.2+
    @enum HMCharacteristicValueCurrentHumidifierDehumidifierState
  • En
    HMCharacteristicValueTargetHumidifierDehumidifierStateiOS 10.2+
    @enum HMCharacteristicValueTargetHumidifierDehumidifierState
  • En
    HMCharacteristicValueCurrentFanStateiOS 10.2+
    @enum HMCharacteristicValueCurrentFanState
  • En
    HMCharacteristicValueTargetFanStateiOS 10.2+
    @enum HMCharacteristicValueTargetFanState
  • En
    HMCharacteristicValueCurrentAirPurifierStateiOS 10.2+
    @enum HMCharacteristicValueCurrentAirPurifierState
  • En
    HMCharacteristicValueTargetAirPurifierStateiOS 10.2+
    @enum HMCharacteristicValueTargetAirPurifierState
  • En
    HMCharacteristicValueSwingModeiOS 10.2+
    @enum HMCharacteristicValueSwingMode
  • En
    HMCharacteristicValueTemperatureUnitiOS 8.0+
    @enum HMCharacteristicValueTemperatureUnit
  • En
    HMCharacteristicValueFilterChangeiOS 10.2+
    @enum HMCharacteristicValueFilterChange
  • En
    HMCharacteristicValueCurrentSlatStateiOS 10.2+
    @enum HMCharacteristicValueCurrentSlatState
  • En
    HMCharacteristicValueSlatTypeiOS 10.2+
    @enum HMCharacteristicValueSlatType

Mechanism and Operation States 8

Constants describing rotation, valves, activation, usage, programs, and other operating modes.

  • En
    HMCharacteristicValueRotationDirectioniOS 8.0+
    @enum HMCharacteristicValueRotationDirection
  • En
    HMCharacteristicValueValveTypeiOS 11.2+
    @enum HMCharacteristicValueValveType
  • En
    HMCharacteristicValueActivationStateiOS 10.2+
    @enum HMCharacteristicValueActivationState
  • En
    HMCharacteristicValueUsageStateiOS 11.2+
    @enum HMCharacteristicValueUsageState
  • En
    HMCharacteristicValueProgramModeiOS 11.2+
    @enum HMCharacteristicValueProgramMode
  • En
    HMCharacteristicValueConfigurationStateiOS 11.2+
    @enum HMCharacteristicValueConfigurationState
  • En
    HMCharacteristicValueLabelNamespaceiOS 10.3+
    @enum HMCharacteristicValueLabelNamespace
  • En
    HMCharacteristicValueInputEventiOS 10.3+
    @enum HMCharacteristicValueInputEvent

Media and Television 12

Constants describing media playback, inputs, remote keys, and television display states.

  • En
    HMCharacteristicValueCurrentMediaStateiOS 18.0+
    @enum HMCharacteristicValueCurrentMediaState
  • En
    HMCharacteristicValueTargetMediaStateiOS 18.0+
    @enum HMCharacteristicValueTargetMediaState
  • En
    HMCharacteristicValuePowerModeSelectioniOS 18.0+
    @enum HMCharacteristicValuePowerModeSelection
  • En
    HMCharacteristicValueRemoteKeyiOS 18.0+
    @enum HMCharacteristicValueRemoteKey
  • En
    HMCharacteristicValuePictureModeiOS 18.0+
    @enum HMCharacteristicValuePictureMode
  • En
    HMCharacteristicValueClosedCaptionsiOS 18.0+
    @enum HMCharacteristicValueClosedCaptions
  • En
    HMCharacteristicValueInputSourceTypeiOS 18.0+
    @enum HMCharacteristicValueInputSourceType
  • En
    HMCharacteristicValueInputDeviceTypeiOS 18.0+
    @enum HMCharacteristicValueInputDeviceType
  • En
    HMCharacteristicValueCurrentVisibilityStateiOS 18.0+
    @enum HMCharacteristicValueCurrentVisibilityState
  • En
    HMCharacteristicValueTargetVisibilityStateiOS 18.0+
    @enum HMCharacteristicValueTargetVisibilityState
  • En
    HMCharacteristicValueVolumeControlTypeiOS 18.0+
    @enum HMCharacteristicValueVolumeControlType
  • En
    HMCharacteristicValueVolumeSelectoriOS 18.0+
    @enum HMCharacteristicValueVolumeSelector

Network Routers 2

Constants reporting the status of HomeKit-enabled routers and their Wi-Fi satellites.

  • En
    HMCharacteristicValueRouterStatusiOS 18.0+
    @enum HMCharacteristicValueRouterStatus
  • En
    HMCharacteristicValueWiFiSatelliteStatusiOS 18.0+
    @enum HMCharacteristicValueWiFiSatelliteStatus

Errors 1

The error domain reported by HomeKit operations.

  • St
    HMErroriOS 8.0+
    An error domain describing failures reported by HomeKit operations.

Classes 1

  • Cl
    HMMediaSourceDisplayOrderProfile
    @abstract Represents media source display ordering functionality for an HMServiceTypeTelevision service that is contained in the services array for this profile.

Structures 1

  • St
    CameraView
    A `CameraView` renders a particular `HMCameraSource`.

Type Aliases 1

  • Ty
    HMErrorBlock
    @brief A generic handler for callbacks containing a single error parameter.

Extends 1

NSNotification
← Device, Sensors & Hardware