Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page Properties
hiddentrue

Status

Status
colourYellow
titlein review

Approver

Nadzeya Karaban

Gini Capture SDK provides various features you can enable. All of them are configured through GiniConfiguration.shared instance. Specifically, the GiniConfiguration is used to configure Gini Capture SDK. For Gini Capture SDK used GiniConfiguration.shared() singleton.

Code Block
languageswift
@objc
public final class GiniConfiguration : NSObject

The GiniConfiguration class enables customization of Gini Capture SDK’s look and feel. If there are limitations regarding which API can be used, this is clearly stated for the specific attribute.

Text can also be set by using the appropriate keys in a Localizable.strings file in the projects bundle. The library will prefer whatever value is set in the following order: attribute in configuration, key in strings file in project bundle, key in strings file in GiniCapture bundle.

Images can only be set by providing images with the same filename in an assets file or as individual files in the projects bundle. The library will prefer whatever value is set in the following order: asset file in project bundle, asset file in GiniCapture bundle.

Info

If there are conflicting pairs of image and text for an interface element (for example, navigationBarCameraTitleCloseButton) the image will always be preferred, while making sure the accessibility label is set.


Expand
titleshared

Makes configuration internally accessible in all classes of Gini Capture SDK.

Code Block
public static var shared: GiniConfiguration
Expand
titleGiniCaptureImportFileTypes

Supported document types by Gini Capture SDK.

Code Block
languageswift
@objc
public enum GiniCaptureImportFileTypes : Int
  • none

    Code Block
    languageswift
    case none
  • pdf

    Code Block
    languageswift
    case pdf
  • pdf_and_images

    Code Block
    languageswift
    case pdf_and_images

General options

Expand
titlecustomDocumentValidations

Sets custom validations that can be done apart from the default ones (file size, file type…). It should throw a CustomDocumentValidationError error.

Code Block
languageswift
@objc
public var customDocumentValidations: ((GiniCaptureDocument) -> CustomDocumentValidationResult)

Button configuration options

Expand
titleprimaryButtonConfiguration
Code Block
languageswift
public lazy var primaryButtonConfiguration: ButtonConfiguration { get set }
Expand
titlesecondaryButtonConfiguration
Code Block
languageswift
public lazy var secondaryButtonConfiguration: ButtonConfiguration { get set }
Expand
titletransparentButtonConfiguration
Code Block
languageswift
public lazy var transparentButtonConfiguration: ButtonConfiguration { get set }
Expand
titlecameraControlButtonConfiguration
Code Block
languageswift
public lazy var cameraControlButtonConfiguration: ButtonConfiguration { get set }
Expand
titleaddPageButtonConfiguration
Code Block
languageswift
public lazy var addPageButtonConfiguration: ButtonConfiguration { get set }

Camera options

Expand
titlecameraSetupLoadingIndicatorColor

Sets the color of the loading indicator on the camera screen to the specified color.

Code Block
languageswift
@objc
public var cameraSetupLoadingIndicatorColor: UIColor
Expand
titlefileImportSupportedTypes

Set the types supported by the file import feature. GiniCaptureImportFileTypes.none by default.

Code Block
languageswift
@objc
public var fileImportSupportedTypes: GiniCaptureImportFileTypes
Expand
titleflashToggleEnabled

Indicates whether the flash toggle should be shown on the camera screen.

Code Block
languageswift
@objc
public var flashToggleEnabled: Bool
Expand
titleflashOnByDefault

When the flash toggle is enabled, this flag indicates if the flash is on by default.

Code Block
languageswift
@objc
public var flashOnByDefault: Bool
Expand
titlenavigationBarCameraTitleCloseButton

Sets the close button text in the navigation bar on the camera screen.

Code Block
languageswift
@objc
public var navigationBarCameraTitleCloseButton: String
Expand
titlenavigationBarCameraTitleHelpButton

Sets the help button text in the navigation bar on the camera screen.

Code Block
languageswift
@objc
public var navigationBarCameraTitleHelpButton: String

Onboarding screens

Expand
titlenavigationBarOnboardingTitleContinueButton

Sets the continue button text in the navigation bar on the onboarding screen.

Code Block
languageswift
@objc
public var navigationBarOnboardingTitleContinueButton: String
Expand
titleonboardingShowAtLaunch

Indicates whether the onboarding screen should be presented at each start of Gini Capture SDK

Code Block
languageswift
@objc
public var onboardingShowAtLaunch: Bool
Expand
titleonboardingShowAtFirstLaunch

Indicates whether the onboarding screen should be presented at the first start of the Gini Capture SDK. It is advised to do so.

Overwrites onboardingShowAtLaunch for the first launch.

Code Block
languageswift
@objc
public var onboardingShowAtFirstLaunch: Bool
Expand
titlecustomOnboardingPages

Sets custom onboarding pages.

For your convenience we provide the OnboardingPage struct.

Code Block
languageswift
public var customOnboardingPages: [OnboardingPage]?
Expand
titlebottomNavigationBarEnabled

Enable/deactivate the bottom navigation bar.

Code Block
languageswift
public var bottomNavigationBarEnabled: Bool
Expand
titlehelpNavigationBarBottomAdapter

Set an adapter implementation to show a custom bottom navigation bar on the help screens.

Code Block
languageswift
public var helpNavigationBarBottomAdapter: HelpBottomNavigationBarAdapter?
Expand
titlecameraNavigationBarBottomAdapter

Set an adapter implementation to show a custom bottom navigation bar on the camera screen.

Code Block
languageswift
public var cameraNavigationBarBottomAdapter: CameraBottomNavigationBarAdapter?
Expand
titlereviewNavigationBarBottomAdapter

Set an adapter implementation to show a custom bottom navigation bar on the review screen.

Code Block
languageswift
public var reviewNavigationBarBottomAdapter: ReviewScreenBottomNavigationBarAdapter?
Expand
titleimagePickerNavigationBarBottomAdapter

Set an adapter implementation to show a custom bottom navigation bar on the image picker screen.

Code Block
languageswift
public var imagePickerNavigationBarBottomAdapter: ImagePickerBottomNavigationBarAdapter?
Expand
titleonboardingNavigationBarBottomAdapter

Set an adapter implementation to show a custom bottom navigation bar on the onboarding screen.

Code Block
languageswift
public var onboardingNavigationBarBottomAdapter: OnboardingNavigationBarBottomAdapter?
Expand
titleonboardingAlignCornersIllustrationAdapter

Set an adapter implementation to show a custom illustration on the “align corners” onboarding page.

Code Block
languageswift
public var onboardingAlignCornersIllustrationAdapter: OnboardingIllustrationAdapter?
Expand
titleonboardingLightingIllustrationAdapter

Set an adapter implementation to show a custom illustration on the “lighting” onboarding page.

Code Block
languageswift
public var onboardingLightingIllustrationAdapter: OnboardingIllustrationAdapter?
Expand
titleonboardingMultiPageIllustrationAdapter

Set an adapter implementation to show a custom illustration on the “multi-page” onboarding page.

Code Block
languageswift
public var onboardingMultiPageIllustrationAdapter: OnboardingIllustrationAdapter?
Expand
titleonboardingQRCodeIllustrationAdapter

Set an adapter implementation to show a custom illustration on the “QR code” onboarding page.

Code Block
languageswift
public var onboardingQRCodeIllustrationAdapter: OnboardingIllustrationAdapter?
Expand
titlecustomLoadingIndicator

Set an adapter implementation to show a custom loading indicator on the document analysis screen.

Code Block
languageswift
public var customLoadingIndicator: CustomLoadingIndicatorAdapter?
Expand
titleonButtonLoadingIndicator

Set an adapter implementation to show a custom loading indicator on the buttons which support loading.

Code Block
languageswift
public var onButtonLoadingIndicator: OnButtonLoadingIndicatorAdapter?
Expand
titlenavigationBarReviewTitleBackButton

Sets the back button text in the navigation bar on the review screen. Use this if you only want to show the title.

Code Block
languageswift
@objc
public var navigationBarReviewTitleBackButton: String
Expand
titlenavigationBarReviewTitleCloseButton

Sets the close button text in the navigation bar on the review screen. Use this if you only want to show the title.

Code Block
languageswift
@objc
public var navigationBarReviewTitleCloseButton: String
Expand
titlenavigationBarReviewTitleContinueButton

Sets the continue button text in the navigation bar on the review screen.

Code Block
languageswift
@objc
public var navigationBarReviewTitleContinueButton: String

Analysis options

Expand
titlenavigationBarAnalysisTitleBackButton

Sets the back button text in the navigation bar on the analysis screen. Use this if you only want to show the title.

Code Block
languageswift
@objc
public var navigationBarAnalysisTitleBackButton: String

Help screens

Expand
titlenavigationBarHelpMenuTitleBackToCameraButton

Sets the back button text in the navigation bar on the help menu screen. Use this if you only want to show the title.

Code Block
languageswift
@objc
public var navigationBarHelpMenuTitleBackToCameraButton: String
Expand
title navigationBarHelpScreenTitleBackToMenuButton

Sets the back button text in the navigation bar on the help screen. Use this if you only want to show the title.

Code Block
languageswift
@objc
public var navigationBarHelpScreenTitleBackToMenuButton: String
Expand
titleshouldShowSupportedFormatsScreen

Indicates whether the supported format screens should be shown. In case of false, the option won’t be shown in the Help menu.

Code Block
languageswift
@objc
public var shouldShowSupportedFormatsScreen: Bool

Open with tutorial options

Expand
titleopenWithAppNameForTexts

Sets the text of the app name for the Open with tutorial texts.

Code Block
languageswift
@objc
public var openWithAppNameForTexts: String
Expand
titleshouldShowDragAndDropTutorial

Sets if the Drag&Drop step should be shown in the Open with tutorial.

Code Block
languageswift
@objc
public var shouldShowDragAndDropTutorial: Bool
Expand
titlecustomMenuItems

Set an array of additional custom help menu items . Those items will be presented as table view cells on the help menu screen. By selecting the cell the user will be redirected to the page, which represented by viewController provided by customer during the HelpMenuViewController.Item initialization.

Code Block
languageswift
public var customMenuItems: [HelpMenuItem]
Expand
titleginiErrorLoggerIsOn

Sets if the default error logging implementation is on.

Code Block
languageswift
@objc
public var giniErrorLoggerIsOn: Bool { get set }
Expand
title customGiniErrorLoggerDelegate

Sets if the custom error logging is implemented.

Code Block
languageswift
public var customGiniErrorLoggerDelegate: GiniCaptureErrorLoggerDelegate? { get set }
Expand
titlelocalizedStringsTableName

Should be set if the default name “Localizable.strings” are not used.

Code Block
languageswift
public var localizedStringsTableName: String?
Expand
titlecloseButtonResource
Code Block
languageswift
@objc
public var closeButtonResource: PreferredButtonResource?
Expand
titlehelpButtonResource
Code Block
languageswift
@objc
public var helpButtonResource: PreferredButtonResource?
Expand
titlebackToCameraButtonResource
Code Block
languageswift
@objc
public var backToCameraButtonResource: PreferredButtonResource?
Expand
titlebackToMenuButtonResource
Code Block
languageswift
@objc
public var backToMenuButtonResource: PreferredButtonResource?
Expand
titlenextButtonResource
Code Block
languageswift
@objc
public var nextButtonResource: PreferredButtonResource?
Expand
titlecancelButtonResource
Code Block
languageswift
@objc
public var cancelButtonResource: PreferredButtonResource?
Expand
titleupdateFont(_:for:)

Enables customization of a font for specific text styles. The change affects all screens where a specific text style is used.

Code Block
languageswift
public func updateFont(_ font: UIFont, for textStyle: UIFont.TextStyle)

Parameters

font

Font that is going to be assosiated with specific text style. You can use scaled font or scale your font with our util method UIFont.scaledFont(_ font: UIFont, textStyle: UIFont.TextStyle)

textStyle

Constants that describe the preferred styles for fonts. Please, find additional information here

Expand
titlecleanup(paymentRecipient:paymentReference:paymentPurpose:iban:bic:amountToPay:)

Functions for clean up

Code Block
languageswift
public func cleanup(paymentRecipient: String,
                    paymentReference: String,
                    paymentPurpose: String,
                    iban: String,
                    bic: String,
                    amountToPay: ExtractionAmount)

Parameters

paymentRecipient

paymentRecipient description

paymentReference

paymentReference description

iban

iban description

bic

bic description

amountToPay

amountToPay description

Find an example implementation here.