HomeKit support on MacOS

I am currently developing an app for MacOS that needs to control HomeKit devices like lights. However, it seems like MacOS is supported on the official documentation, but not when I try to create an app ID on developer.apple.com.

On the link https://developer.apple.com/apple-home/, MacOS is clearly showed as supported for MacOS. But when I try to create an app ID, it shows that it is only compatible for iOS, VisionOS and WatchOS.

Could this be clarified?

Best regards, orangeidle25

Answered by DTS Engineer in 884226022

HomeKit is an outlier in that it’s supported on the Mac but only for Mac Catalyst apps.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

HomeKit is an outlier in that it’s supported on the Mac but only for Mac Catalyst apps.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

HomeKit is an outlier in that it’s supported on the Mac but only for Mac Catalyst apps.

FYI, while the sample project "Interacting with a home automation network" does not include a specific Mac Catalyst destination, the project can easily be updated to include it. You'll get one build error in its "tapAddAccessory" method, but that error is because Mac Catalyst does not include "addAndSetupAccessories". You can clear that error by simply deleting that code, after which the sample will build and run fine.

As a side note, this sample is VERY useful as a general development helper, particularly when run on the Mac. It shows you the full HomeKit layout and configuration of every accessory in the target home, which makes it easier to figure out how an accessory is configured and controlled. It also lets you see that "raw" configuration at the same time your app is interacting with it, which can help investigating and debugging any issues.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

I have tried to reach out to Apple to get some clarification on why HomeKit is not supported on MacOS, the "use Mac Catalyst" makes no sense, why not just support it natively??

I have tried to reach out to Apple to get some clarification on why HomeKit is not supported on macOS. The "use Mac Catalyst" makes no sense. Why not just support it natively?

The main technical issue is that part of HomeKit (specifically, camera APIs like HMCameraView) are built on UIView, which prevents the framework from being "directly" exported as a macOS framework. This could be addressed by either removing those APIs from the macOS framework or by creating macOS equivalents of the same API, but that's never been done.

In practice, I think the experience has been that most 3rd-party HomeKit apps also run on iOS (or, more typically, started as macOS apps), which has made Mac Catalyst the natural development platform.

That leads to my question: what are you trying to do that can't be done through Mac Catalyst?

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

HomeKit support on MacOS
 
 
Q