ThreadNetwork

RSS for tag

Helps clients to share Thread credentials in a safe and secure manner, and automatically chooses a designated network for each home.

Posts under ThreadNetwork tag

5 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Thread Network API not working
I'm trying to use ThreadNetwork API to manage TheradNetworks on device (following this documentation: https://developer.apple.com/documentation/threadnetwork/), but while some functions on THClient work (such as getPreferedNetwork), most don't (storeCredentials, retrieveAllCredentials). When calling these functions I get the following warning/error: Client: -[THClient getConnectionEntitlementValidity]_block_invoke - Error: -[THClient storeCredentialsForBorderAgent:activeOperationalDataSet:completion:]_block_invoke:701: - Error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 414 named com.apple.ThreadNetwork.xpc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service with pid 414 named com.apple.ThreadNetwork.xpc was invalidated from this process.} Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 414 named com.apple.ThreadNetwork.xpc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service with pid 414 named com.apple.ThreadNetwork.xpc was invalidated from this process.} Failed to store Thread credentials: Couldn’t communicate with a helper application. STEPS TO REPRODUCE Create new project Add Thread Network capability via Xcode UI (com.apple.developer.networking.manage-thread-network-credentials) Trigger storeCredentials let extendedMacData = "9483C451DC3E".hexadecimal let tlvHex = "0e080000000000010000000300001035060004001fffe002083c66f0dc9ef53f1c0708fdb360c72874da9905104094dce45388fd3d3426e992cbf0697b030d474c2d5332302d6e65773030310102250b04106c9f919a4da9b213764fc83f849381080c0402a0f7f8".hexadecimal // Initialize the THClient let thClient = THClient() // Store the credentials await thClient.storeCredentials(forBorderAgent: extendedMacData!, activeOperationalDataSet: tlvHex!) { error in if let error = error { print(error) print("Failed to store Thread credentials: \(error.localizedDescription)") } else { print("Successfully stored Thread credentials") } } NOTES: I tried with first calling getPreferedNetwork to initiate network permission dialog Tried adding meshcop to bojur services Tried with different release and debug build configurations
0
0
60
3d
How to use notification to notify shared container changes in cloudkit?
I would like to create a private container and share a zone between two users with different iCloud accounts. All changes made by one would be notified with push notifications to the other user's db. Both could change the same information. Exactly as it is done in this apple project. https://developer.apple.com/documentation/cloudkit/shared_records/sharing_cloudkit_data_with_other_icloud_users However, I have been reading this code for days and I am stuck on it, it is extremely complicated for my level. I would really like to know if there is any simple project that uses the same idea to build this logic with swiftui.
3
0
940
Oct ’24
How to use ThreadNetwork.framework Api
Hello, I would like to ask if I can use ThreadNetwork.framework. My project has been configured with com.apple.developer. networking. manage thread network credentials according to the documentation, but the relevant API still cannot be used. Currently, there is an error message: Client: - [THClient getConnectionEntitlementValidity] block invoice - Error: (null) Client: [THClient retrieveAllCredits:] _block_invoke - Error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 555 named com. apple. ThreadNetwork. xpc was validated from this process." UserInfo={NSDebugDescription=The connection to service with pid 555 named com. apple. ThreadNetwork. xpc was validated from this process.} May I ask if I can use the relevant API
0
0
459
Apr ’24