IamUtil.getDeviceDetailsAsync() Overload 1
DESCRIPTION
Asynchronously retrieve device information that typically does not need a paired user.
The specified AsyncIamResultReceiver closure is invoked with IamError.OK and resulting data upon successful completion or with an error if an error occurs. See the getDeviceDetails()
function for details about possible error codes.
DECLARATION
static public func getDeviceDetailsAsync(connection: Connection,
closure: @escaping (IamError, DeviceDetails?) -> ())
PARAMETERS
connection:
- An established connection to the device
closure:
- Invoked when the device information is successfully retrieved or retrieval fails.
Overload 2
DESCRIPTION
Asynchronously retrieve device information that typically does not need a paired user.
Uses Swift concurrency and is therefore only available on iOS 13 and above.
DECLARATION
static public func getDeviceDetailsAsync(connection: Connection) async throws -> DeviceDetails
PARAMETERS
connection:
- An established connection to the device
THROWS ERRORS
BLOCKED_BY_DEVICE_CONFIGURATION:
- if the device configuration does not allow retrieving this list (the
IAM:GetPairing
action is not set for the Unpaired role) IAM_NOT_SUPPORTED:
- if Nabto Edge IAM is not supported by the device
RETURNS
DeviceDetails object with information about the device