最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

widgetkit - HomeKit API fails when AppIntent is triggered by Widget in iOS 18.4 ("Missing entitlement for API"

programmeradmin2浏览0评论

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!

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论