Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/signing-sdk/face-auth-ios/llms.txt

Use this file to discover all available pages before exploring further.

TadSigningResult is the value delivered to the completion closure of TadSigningViewController when an operation finishes, whether successfully or not. It has two cases: .success with the JWT and request identifier, and .failure with a typed error code and a human-readable message.

Enum declaration

enum TadSigningResult

Cases

.success(jwt: String, requestId: String)

The operation completed without error.
jwt
String
An ES512-signed JWT issued by the TAD signing backend. This string is populated only when the operation was initiated with .sign mode. For .register mode, this field is an empty string "" — not nil. Forward this value to your backend to verify the signing operation.
requestId
String
A unique identifier assigned by the backend for this specific signing or registration request. Populated for both .register and .sign modes. Store or log this value for auditing and support purposes.

.failure(code: TadSigningErrorCode, message: String)

The operation failed before producing a result.
code
TadSigningErrorCode
A typed error code indicating the category of failure. Access the string representation using .rawValue — for example, code.rawValue produces a String suitable for logging or display.
message
String
A human-readable description of the error. Suitable for display in debug logs; review before surfacing directly to end users.

Handling results

Use a switch statement to handle both cases. The following example is from the demo app’s ContentView.swift:
let signingVC = TadSigningViewController(
    config: SDKConfig.shared,
    bankId: bankId,
    dto:    dto,
    mode:   mode
) { signingResult in
    isLoading = false
    switch signingResult {
    case .success(let jwt, let requestId):
        resultColor = .green
        result = mode == .register
            ? "Registered\nrequestId: \(requestId)"
            : "Signed\nrequestId: \(requestId)\n\nJWT:\n\(jwt)"
    case .failure(let code, let message):
        resultColor = .red
        result = "\(code.rawValue)\n\(message)"
    }
}
vc.present(signingVC, animated: true)
For .register mode, jwt is an empty string "", not nil. Checking jwt.isEmpty is the correct way to detect a registration result versus a sign result. Do not pass an empty JWT to your backend — only forward it when it is non-empty.
TadSigningErrorCode is a RawRepresentable enum with a String raw value. Use code.rawValue to obtain the error code string for logging, analytics, or display.

Build docs developers (and LLMs) love