Add Accessory to Home Always Returns Error(Genericerror)

Re-Pair HomeKit Accessory

Unpairing the accessory from the simulator just removes the pairing relationship in the simulator, not from the homekit database. From HMCatalog, you can remove the accessory by swiping on the accessory in the home view and pressing the delete button.

There isn't a way for homekit to detect if the accessory has ended it's pairing relationship. When you unpair in the simulator that way, it clears the simulator's keys for that accessory but doesn't tell homekit. As far as homekit can tell, that accessory just isn't visible anymore (i.e. unreachable).

To remove the accessory, you need to call the removeAccessory method on HMHome from your app. This will both remove the accessory from the home and notify the accessory to remove the pairing relationship with the device. From there, you should be able to add the accessory again.

showBluetoothAccessoryPicker returns error 2

This library only works with MFI devices. It WILL NOT work with the majority of common devices. It is useless for typical devices.

HMErrorDomain Code=45 - The operation couldn’t be completed - syntax issues

This is an NSNumber literal, equivalent to [NSNumber numberWithInt:42].



Related Topics



Leave a reply



Submit