Post

Replies

Boosts

Views

Activity

Reply to MatterSupport MatterExtension RequestHandler never triggered
Thank you for your fast reply. I will clarify it a bit more. Yes, I'm sure, I will need it, as I will support an ecosystem, as you said. The Matterwebsite points you to Mattersupport. I already created a small test app with nothing then a button to run MatterSupport in it's extension. I used the test app as host for the extension then, same like I did it for Siri or AppWidgets (should be the same flow for the Matterextension, or am I wrong). What I expected, is, that at least the init function will be triggered in the debugger, but even this isn't working. So I guess, I missed something adding the extension correctly.
Topic: App & System Services SubTopic: Hardware Tags:
Jan ’25
Reply to Thread Network API not working
Thank you for your answer. I followed your idea to store the THClient reference as a member variable of the object instead of a local reference, but this led me to the same error. I found this post: https://developer.apple.com/forums/thread/718467?answerId=768704022#768704022 and followed the idea, to make a "softlink" in the callback to the objects thclient reference and this works. So yes, the objects ref is somehow removed by garbage collection. Working example: import ThreadNetwork import OSLog @available(iOS 15.0, *) public class ThreadManager { let client = THClient() func storeThread() { guard let baIdData = Data(hexString: "<baId>") else { return } guard let tlvData = Data(hexString: "<tlv>") else { return } os_log(.default, "THREAD SETUP") self.client.storeCredentials(forBorderAgent: baIdData, activeOperationalDataSet: tlvData) { error in let c = self.client // the magic, setting a "softlink" will work if let error = error { os_log(.error, "thread error \(error)") } else { os_log(.debug, "thread creds stored") } } } }
Dec ’25