IamUtil.pairLocalOpenAsync()

DESCRIPTION

Perform Local Open pairing asynchronously, requesting the specified username.

The specified AsyncIamResultReceiver closure is invoked with IamError.OK upon successful completion or with an error if an error occurs. See the pairLocalOpen() function for details about possible error codes.

DECLARATION

    static public func pairLocalOpenAsync(
            connection: Connection,
            desiredUsername: String,
            closure: @escaping AsyncIamResultReceiver) 

PARAMETERS

connection:
An established connection to the device this client should be paired with
desiredUsername:
Assign this username on the device if available (pairing fails with .USERNAME_EXISTS if not)
closure:
Invoked when the pairing attempt succeeds or fails.