title: Xamarin iOS - HomeKit integration
body: <p>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 HomeKit</p>
  <p><a href="https://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_" rel="nofollow noreferrer">https://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_</a>_</p>
  <p>in particular the API with the following signature AddAndSetupAccessories(HMAccessorySetupPayload, Action&lt;HMAccessory[],NSError&gt;)
  but the Action that should be called on completion it's never called.</p>
  <p>The only result that I get is that my app tries to go in background but it remain stuck and become unusable.</p>
  <p>The only hint that I get from the device log is this:</p>
  <p>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!</p>
  <p>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.</p>
  <p>Has anyone experienced something like this?</p>
  <p>Thank you guys</p>