admin管理员组

文章数量:1344314

I'm facing an issue since updating to iOS 18.4 where an AppIntent that controls HomeKit devices fails when triggered from a Widget.

In iOS 18.3 and earlier, this setup worked fine:

  • A Widget with a button calling an AppIntent
  • The AppIntent performs a HomeKit action (e.g., toggling a light)

Starting in iOS 18.4, when the AppIntent is triggered and the app is not running in the background, I get this error:

Error Domain=HMErrorDomain Code=80 "Missing entitlement for API." UserInfo={ NSLocalizedFailureReason=Handler does not support background access, NSLocalizedDescription=Missing entitlement for API. }

If the app is alive (even in the background), the intent works correctly.

It seems that triggering HomeKit actions from the widget's process is now blocked. I've verified that the com.apple.developer.homekit entitlement is present in both the main app and the AppIntent extension.

Has anyone found a workaround, or is there a new entitlement required to allow this behavior in iOS 18.4?

Thanks!

本文标签: