Excellent thank you for you replies, I haven't 100% tested this yet, but using a valid matter setup QR the below code launches the "Add Device to Home UI" and accepts the code, recognises the device type etc ..
import HomeKit
import Matter
func registerMatterDevice(onboardingCode: String) async {
let payload = MTRSetupPayload(payload: onboardingCode)
guard let setupPayload = payload else {
print("Invalid Matter onboarding code")
return
}
let request = HMAccessorySetupRequest()
request.matterPayload = setupPayload
let setupManager = HMAccessorySetupManager()
_ = try? await setupManager.performAccessorySetup(using: request)
}
This will hopefully let me get to where I want to be.
Thank you very much.
Topic:
App & System Services
SubTopic:
Core OS
Tags: