Home / IOS Development / Xamarin iOS – HomeKit integration

Xamarin iOS – HomeKit integration



I am working on an app that uses Xamarin.iOS. I need to add the ability to add accessories to HomeKit using the address that comes from an internal API (basically I get the address of the device using a web request). When I have this accessory setup code, I try to use the following API from HomeKit

https://docs.microsoft.com/en-us/dotnet/api/homekit.hmhome.addandsetupaccessories?view=xamarin-ios-sdk-1

2#HomeKit_HMHome_AddAndSetupAccessories_HomeKit_HMAccessorySetupPayload_Komeit_Home_Home_Hction_H

especially API with the following signature AddAndSetupAccessories (HMAccessorySetupPayload, Action) but the action to be called upon completion is never called.

The only result I get is that my app tries to go in the background, but it stays fixed and becomes useless.

The only hint I get from the device log is this:

The HomeUIService Host app does not have the right ‘com.apple.homekit.private-spi-access’ or ‘com.apple.developer.homekit.allow-setup-payload’ – not allowed to add from URL!

but I have the right to Homekit added to my app. I can not find any documentation on the rights specified in the log message.

Has anyone experienced anything like this?

Thanks people


Source link