但我已将 Homekit 的权利添加到我的应用程序中.我找不到关于日志消息中指定的权利的任何文档.有人遇到过这样的事情吗?谢谢大家 解决方案 我从 Apple 支持那里得到了答案,所以我只为未来的某个人或过去的我回答我的问题(黑暗系列剧透:).如果您不添加权利com.apple.developer.homekit.allow-setup-payload",基本上这个 API 不起作用.值等于 True.我知道,没有关于此的文档,但就是这样.大家加油I'm working on an app using Xamarin.iOS.I need to add the possibility to add an accessory to HomeKit using the address coming from an internal API (basically I retrieve the address of the device using a web request).Once I have this setupCode of the accessory I try to use the following API from HomeKithttps://docs.microsoft.com/en-us/dotnet/api/homekit.hmhome.addandsetupaccessories?view=xamarin-ios-sdk-12#HomeKit_HMHome_AddAndSetupAccessories_HomeKit_HMAccessorySetupPayload_System_Action_HomeKit_HMAccessory___Foundation_NSError__in particular the API with the following signature AddAndSetupAccessories(HMAccessorySetupPayload, Action<HMAccessory[],NSError>)but the Action that should be called on completion it's never called.The only result that I get is that my app tries to go in background but it remain stuck and become unusable.The only hint that I get from the device log is this:HomeUIService Host app does not have entitlement 'com.apple.homekit.private-spi-access' or 'com.apple.developer.homekit.allow-setup-payload' -- not allowed to add from URL!but I have the Entitlement for Homekit added to my app. I'm not able to find any documentation on the entitlements specified in the log message.Has anyone experienced something like this?Thank you guys 解决方案 I had the answer from Apple Support, so I answer my question just for someone in the future or myself in the past (Dark series spoiler :).Basically this API doesn't work if you don't add the Entitlement "com.apple.developer.homekit.allow-setup-payload" with value equals to True.I know, there is no documentation regarding this, but this is it.Cheers guys 这篇关于Xamarin iOS - HomeKit 集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-15 21:23