Skip to Content

Initializing the SDK

To use the SDK’s methods and classes, your application must call the SDK’s initialise method to initialize the MobileCredentialVerifier class:

Initializing the SDK
func initialise(loggerConfiguration: LoggerConfiguration = LoggerConfiguration()) throws

Configure logger behavior

You can configure the SDK’s logger behavior using the optional loggerConfiguration parameter:

Configure logger behavior
init() { do { let loggerConfiguration = LoggerConfiguration( logLevel: .Debug, callbackLogLevel: .Debug) { event in print( "Perform any custom action with the log event: \(event.message)" ) } mobileCredentialVerifier = MobileCredentialVerifier.shared try mobileCredentialVerifier .initialise( loggerConfiguration: loggerConfiguration ) } catch { print(error) } }
  • logLevel : Determines which events are written to log files:
  • callbackLogLevel : Determines which events invoke the callback function:
  • callback : Defines the function to call when events defined by callbackLogLevel occur.

Logging levels

These levels apply to both the logLevel and callbackLogLevel parameters (corresponding raw value in shown in parenthesis):

  • Off (0).
  • Error (1).
  • Warning (2).
  • Info (3).
  • Debug (4).
  • Verbose (5).
Last updated on