enableCredentialSharingMode(withExtendedPANId:completion:)
Triggers Credential Share mode on a nearby eligible Apple Border Router (tvOS(27.0)).
Declaration
func enableCredentialSharingMode(withExtendedPANId xpanId: Data, completion: @escaping @Sendable ((any Error)?) -> Void)func enableCredentialSharingModeWithExtendedPANId(extendedPANId xpanId: Data) async throwsDiscussion
This method scans for Thread credential sharing capable Apple Border Routers, selects an eligible device, and requests to generate an ephemeral 9-digit code and start credential sharing mode.
When you call this method, an alert appears asking for user permission to access credentials. The one-time admin code is displayed internally via an alert; it is not returned to the caller.
/// - Parameters:
extendedPANID: The extended PAN identifier of the Thread network.
completion: The completion handler the framework calls after the user acknowledges the alert. The
errorparameter is nil on success, or non-nil if credential sharing mode could not be enabled.