问题
I want to know how to use
apple docs
func addAndSetupAccessories(with payload: HMAccessorySetupPayload, completionHandler completion: @escaping ([HMAccessory]?, Error?) -> Void)
I want to use this func because I need to pair HomeKit accessory without QR code or the HomeKit code. I want to pair the accessory through code.
the documentation of HMAccessorySetupPayload argument for the above function, it says it accepts URL for init.
I scanned QR-code for an accessory with QR code reader, it showed some type of URL as X-HM://00671I5XXXXXX
can some help me how to pair the accessory with this function.
来源:https://stackoverflow.com/questions/52885476/how-to-add-and-set-up-accessory-using-hmaccessorypayload