Type Aliases

The following type aliases are available globally.

  • Lambda that gets the site name as the input string and should return a string for registration

    • example: let _:RegistrationDetailsProvider = { siteName in return "Register for \(siteName)" }

    Declaration

    Swift

    public typealias RegistrationDetailsProvider = (_ siteName: String) -> (String)
  • Lambda that gets the reader name as the input string and should return a string for authentication

    • example: let _:AuthenticationDetailsProvider = { reader in return "Authenticate for \(reader.name)" }

    Declaration

    Swift

    public typealias AuthenticationDetailsProvider = (_ readerName: String) -> (String)
  • Lambda which allows customising the “please open app” notification title and body

    • example: let _:NotificationDetailsProvider = { reader in return (title: reader.name, body: "please open app") }

    Declaration

    Swift

    public typealias NotificationDetailsProvider = (_ reader: Reader) -> (title: String, body: String)
  • Completion lambda which returns Reader and ReaderAction of the request reader action with `nil’ error if the request completed successfully. Otherwise, returns a non-nil error to indicate request failure

    Declaration

    Swift

    public typealias ReaderActionCompletedHandler = (_ reader: Reader, _ action: ReaderAction, _ error: ReaderConnectionError?) -> ()
  • Completion lambda which returns the Reader and list available reader actions with `nil’ error if the enumerate request completed successfully. Otherwise, returns a non-nil error to indicate enumeration failure

    Declaration

    Swift

    public typealias ReaderActionEnumerationCompletedHandler = (_ reader: Reader, _ actions: [ReaderAction]?, _ error: ReaderConnectionError?) -> ()
  • Completion lambda which returns MobileCredential to delete with a nil error if the delete was successful. Otherwise, a non-nil error to indicate failure

    Declaration

    Swift

    public typealias CredentialDeleteCompletedHandler = (_ credential: MobileCredential, _ error: Error?) -> ()
  • Lambda that expects a Bool and SecondFactorAuthenticationType to continue the mobile credential registration

    Declaration

    Swift

    public typealias SecondFactorAuthenticationTypeSelector = (_ succeeded: Bool, _ authenticationType: SecondFactorAuthenticationType?) -> ()

    Parameters

    succeeded

    Pass true to tell the SDK that the user successfully selected an authentication type. Pass false to tell the SDK that the user canceled

  • Wallet migration handler lambda which takes the continueMigration boolean to continue or cancel the Wallet provisioning request.

    Declaration

    Swift

    public typealias WalletMigrationHandler = (_ continueMigration: Bool) -> ()
  • The LogFormatter callback can be used to change the log line format - Only applicable if you’re logging to a file. If you configure an externalWriter then it is up to you to format your log lines. The default LogFormatter uses the format: TIME LEVEL [CLASSNAME] MESSAGE

    Declaration

    Swift

    public typealias LogFormatter = (_ message: String, _ level: LogLevel, _ parameters: LogParameters) -> String