GBG Developers

Guides   |   Initialize the SDK

Initialize the SDK

Importing Modules

The SDK is modular and the SDK services are imported into the application code as show here:

import GBGCore
import GBGAddressLookup
import GBGPeopleVerify
import GBGFaceMatch
import GBGSmartCapture
import GBGLiveness
import IDSLiveness

Import the modules that are needed in each code file that requires them. Importing the GBGCore module is essential in each of those code files, in order to use the SDK for any service.

As an example, if a code file performs address lookup, then import both GBGCore and GBGAddressLookup modules in that file.

if a code file is using the Liveness service, it is important to import GBGCore and both GBGLiveness and IDSLiveness in that file.

Initializing the SDK

At the start of the application code (for example in the AppDelegate.swift source code file) import all of the modules listed above apart from IDSLiveness and then call the GBGVerifySDK.initialize function to initialize the SDK. Here is an example fragment demonstrating how all the SDK services can be initialized; GBGCore needs to be initialized first and the remainder can occur in any order:


GBGVerifySDK.initialize(GBGCore.self, GBGAddressLookup.self, GBGPeopleVerify.self, GBGFaceMatch.self, GBGSmartCapture.self, GBGLiveness.self)