GBG Developers

Guides   |   Add iOS SDK to your Project

Add iOS SDK to your Project

Once GBG has been contacted and you have been set up with an Identity Solution account and received access to the SDK, you can start up Xcode to create a new project, or open an existing project, and double-check under General -> Targets -> Deployment Info that the project is targeting iOS 10.0 or above.

If your code has UIScene…. is only available in iOS 13.0 or newer warning(s), accept the Xcode recommended changes, which are to add this text:

@available(iOS 13.0, *)

Depending on the version of Xcode, you may also have to insert the following code:

class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

In your project, create a Frameworks folder and then select all the folders with .framework suffix in the SDK GBG Frameworks/Third Party path and drag to the project Frameworks folder in Xcode. Repeat with the .framework suffix folders in the GBG Frameworks/GBG folder.

Create a Resources folder in the project, and drag the default profile zip file from the SDK GBG Frameworks/Resources folder into there. This zip file is used for configuring document scanning preferences and is supplied by GBG. If GBG has supplied you with additional profiles, you can add them into the Resources project folder as well.

Navigate to General -> Targets -> Frameworks, Libraries and Embedded Content and for each imported framework, set the Embed attribute to Embed & Sign.

Next, a setting needs to be disabled. Go to Build Settings and in the search bar type bitcode in order to locate the Enable Bitcode setting (it will be under Build Options). It needs to be set to No in order to disable it.

Go to Signing & Capabilities and click on + Capability and search for Keychain Sharing. Once it is added to the project, you don’t need to add a keychain access group. Keychain Sharing is needed so that during run-time, when a GBG access token has been obtained, it will be temporarily stored in the iOS keychain.