Structure

HIDApproveError

HID Approve Error Code definitions (NSError.code)

Declaration

struct HIDApproveError

Usage

For standard error handling instructions, refer to NSError | Apple Developer Documentation.

Example Code:

do {
    try somethingThatThrows()
} catch {
    let nsError = error as NSError
    print("Domain:", nsError.domain)
    print("Code:", nsError.code)
    if let description = nsError.userInfo[NSLocalizedDescriptionKey] as? String {
        print("Description:", description)
    }
    if let tries = nsError.userInfo[HIDApproveError.USERINFO_ERROR_AUTH_REMAINING_TRIES] as? String {
        print("Remaining Tries:", tries)
    }
}

Topics

Additional error details

Internal errors

Credential errors

Device errors

Communication errors

Transaction errors

See Also

Error Handling