deleteCredentials(forBorderAgent:completion:)
Deletes Thread network credentials from the framework database for a Border Agent.
Declaration
func deleteCredentials(forBorderAgent borderAgentID: Data, completion: @escaping @Sendable ((any Error)?) -> Void)func deleteCredentials(forBorderAgent borderAgentID: Data) async throwsParameters
- borderAgentID:
The identifer of a Thread network Border Agent.
- completion:
The completion handler the framework calls after deleting the credentials.
Mentioned in
Discussion
The Border Agent is the software component running in the Thread Border Router responsible for advertising itself in the Wi-Fi or Ethernet network.
Call the method as follows:
func removeCredentials(borderAgentID: Data) async -> (Error?) {
let client = THClient()
var err:Error?
do {
err = try await client.deleteCredentials(forBorderAgent: borderAgentID) as? Error
} catch {
err = error
}
return (err)
}