Configuration

public struct Configuration

SDK Configuration

  • Your application identifier

    Declaration

    Swift

    public let appId: String
  • Your contract identifier

    Declaration

    Swift

    public let contractId: String
  • The PKCS1 private key base 64 encoded data

    Declaration

    Swift

    public let privateKeyData: Data
  • Use external browser to authenticate. Otherwise SFSafariViewController will be used.

    Declaration

    Swift

    public let authUsingExternalBrowser: Bool
  • Base URL path to override default digi.me host. If not present will use the default value.

    Declaration

    Swift

    public let baseUrl: String?
  • Creates a configuration

    Declaration

    Swift

    public init(appId: String, contractId: String, privateKey: String, authUsingExternalBrowser: Bool = false, baseUrl: String? = nil) throws

    Parameters

    appId

    Your application identifier

    contractId

    Your contract identifier

    privateKey

    Your PKCS1 private key in PEM format - either with or without the “—–BEGIN RSA PRIVATE KEY—–” header and “—–END RSA PRIVATE KEY—–” footer

    authUsingExternalBrowser

    By default will use SFSafariViewController instance or will forward authentication flow to the default browser on the device.

    baseUrl

    Base URL path including version to change digi.me environment. If not present will use the default one.