How to Add and Set up accessory using HMAccessoryPayLoad

你说的曾经没有我的故事 提交于 2020-08-08 03:51:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!