Closed CodeOcenS closed 1 year ago
Yes, for the sample to work like this you need com.apple.developer.networking.manage-thread-network-credentials
. That said, this applies only for the Thead part. The MatterSupport Framework should work without this entitlement
We don't plan to use Thread, I try to delete com.apple.developer.networking.manage-thread-network-credentials
, the project can compile and run. But still got error:
Error Domain=HMFErrorDomain Code=12 "Operation canceled." UserInfo={NSLocalizedDescription=Operation canceled.}
Is it related to the mobile phone system? I tried both from iOS16.1-iOS16.2, based on this error. But the actual device has been configured into the network.
You are seeing the precise error I see. The project is meant to demonstrate that issue
You can try to use the App Groups to save the onboardingPayload
override func commissionDevice(in home: MatterAddDeviceRequest.Home?, onboardingPayload: String, commissioningID: UUID) async throws { let userDefault = UserDefaults(suiteName: "") userDefault?.set(onboardingPayload, forKey: "") }
Then,In your APP get it.
You can try to use the App Groups to save the onboardingPayload
override func commissionDevice(in home: MatterAddDeviceRequest.Home?, onboardingPayload: String, commissioningID: UUID) async throws { let userDefault = UserDefaults(suiteName: "") userDefault?.set(onboardingPayload, forKey: "") }
Then,In your APP get it.
Thanks! I will try it.
After I modify the bundle ID, the project cannot be compiled. If I want to successfully use MatterSupport, do I have to apply for
com.apple.developer.networking.manage-thread-network-credentials
? At present, I keep prompting the following error after scanning the codeError Domain=HMFErrorDomain Code=12 "Operation canceled." UserInfo={NSLocalizedDescription=Operation canceled.}
orError Domain=HMErrorDomain Code=18 "Pairing Failed" UserInfo={NSLocalizedDescription=Pairing Failed, NSUnderlyingError=0x280adfe40 {Error Domain=HAPErrorDomain Code=15 "(null)"}}