BcmGlobalConfig

The SDK global configuration interface (BcmGlobalConfig) is a non optional interface. The interface is used for configuring underlying Biocapture SDK components, such as API keys, and global branding. You can consume this class by subclassing it, which enables lazy value computation.

Interface

Swift:

public struct BcmGlobalConfig {

    /**
     Sdk licensing options
     */
    let licensing: BcmLicencing

    /**
     * Branding configuration interface; can be overwritten
     */
    let branding: BcmBranding

    public init(
        licensing: BcmLicencing,
        branding: BcmBranding = BcmBranding()
    ) {
        self.licensing = licensing
        self.branding = branding
    }
}

BcmLicencing enum definition:

public enum BcmLicencing {

    case TRIAL

    case ONLINE(key: String)

    case OFFLINE(key: String)

    case FLOATING_SERVER(serverURL: String)

}

Example

Swift:

// Trial mode
let bcmGlobalConfig = BcmGlobalConfig(
    licensing: .TRIAL
)

// Online licensing
let bcmGlobalConfig = BcmGlobalConfig(
    licensing: .ONLINE(key: "<license-key>")
)

// Offline licensing
let bcmGlobalConfig = BcmGlobalConfig(
    licensing: .OFFLINE(key: "<offline-token>")
)

// Floating server licensing
let bcmGlobalConfig = BcmGlobalConfig(
    licensing: .FLOATING_SERVER(serverURL: "<server-url>")
)

Usage

You can set the globalConfigin the constructor of the Scan Controller (BcmScanController).

Swift:

let bcmScanController = BcmScanController(
            globalConfig: bcmGlobalConfig)

See Also

results matching ""

    No results matching ""