IamUtil.isCurrentUserPairedAsync() Overload 1

DESCRIPTION

Query asynchronously if the current user is paired or not on a specific device.

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

DECLARATION

static public func isCurrentUserPairedAsync(connection: Connection,
                                                closure: @escaping AsyncIamResultReceiverWithData<Bool>)

PARAMETERS

connection:
An established connection to the device
closure:
Invoked when the pairing information is successfully retrieved or retrieval fails.

Overload 2

DESCRIPTION

Asynchronously query if the current user is paired or not on a specific device.

Uses Swift concurrency and is therefore only available on iOS 13 and above.

DECLARATION

static public func isCurrentUserPairedAsync(connection: Connection) async throws -> Bool

PARAMETERS

connection:
An established connection to the device

THROWS ERRORS

IAM_NOT_SUPPORTED:
if Nabto Edge IAM is not supported by the device

RETURNS

true iff the current user is paired with the device