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 |
---|
|
@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 |
---|
|
Makes configuration internally accessible in all classes of Gini Capture SDK. Code Block |
---|
public static var shared: GiniConfiguration |
|
Expand |
---|
title | GiniCaptureImportFileTypes |
---|
|
Supported document types by Gini Capture SDK. Code Block |
---|
| @objc
public enum GiniCaptureImportFileTypes : Int |
none
pdf
pdf_and_images
Code Block |
---|
| case pdf_and_images |
|
General options
Expand |
---|
title | customDocumentValidations |
---|
|
Sets custom validations that can be done apart from the default ones (file size, file type…). It should throw a CustomDocumentValidationError error. Code Block |
---|
| @objc
public var customDocumentValidations: ((GiniCaptureDocument) -> CustomDocumentValidationResult) |
|
Expand |
---|
title | primaryButtonConfiguration |
---|
|
Code Block |
---|
| public lazy var primaryButtonConfiguration: ButtonConfiguration { get set } |
|
Expand |
---|
title | secondaryButtonConfiguration |
---|
|
Code Block |
---|
| public lazy var secondaryButtonConfiguration: ButtonConfiguration { get set } |
|
Expand |
---|
title | transparentButtonConfiguration |
---|
|
Code Block |
---|
| public lazy var transparentButtonConfiguration: ButtonConfiguration { get set } |
|
Expand |
---|
title | cameraControlButtonConfiguration |
---|
|
Code Block |
---|
| public lazy var cameraControlButtonConfiguration: ButtonConfiguration { get set } |
|
Expand |
---|
title | addPageButtonConfiguration |
---|
|
Code Block |
---|
| public lazy var addPageButtonConfiguration: ButtonConfiguration { get set } |
|
Camera options
Expand |
---|
title | cameraSetupLoadingIndicatorColor |
---|
|
Sets the color of the loading indicator on the camera screen to the specified color. Code Block |
---|
| @objc
public var cameraSetupLoadingIndicatorColor: UIColor |
|
Expand |
---|
title | fileImportSupportedTypes |
---|
|
Set the types supported by the file import feature. GiniCaptureImportFileTypes.none by default. Code Block |
---|
| @objc
public var fileImportSupportedTypes: GiniCaptureImportFileTypes |
|
Expand |
---|
|
Indicates whether the flash toggle should be shown on the camera screen. Code Block |
---|
| @objc
public var flashToggleEnabled: Bool |
|
Expand |
---|
|
When the flash toggle is enabled, this flag indicates if the flash is on by default. Code Block |
---|
| @objc
public var flashOnByDefault: Bool |
|
Expand |
---|
title | navigationBarCameraTitleCloseButton |
---|
|
Sets the close button text in the navigation bar on the camera screen. Code Block |
---|
| @objc
public var navigationBarCameraTitleCloseButton: String |
|
Expand |
---|
title | navigationBarCameraTitleHelpButton |
---|
|
Sets the help button text in the navigation bar on the camera screen. Code Block |
---|
| @objc
public var navigationBarCameraTitleHelpButton: String |
|
Onboarding screens
Expand |
---|
title | navigationBarOnboardingTitleContinueButton |
---|
|
Sets the continue button text in the navigation bar on the onboarding screen. Code Block |
---|
| @objc
public var navigationBarOnboardingTitleContinueButton: String |
|
Expand |
---|
title | onboardingShowAtLaunch |
---|
|
Indicates whether the onboarding screen should be presented at each start of Gini Capture SDK Code Block |
---|
| @objc
public var onboardingShowAtLaunch: Bool |
|
Expand |
---|
title | onboardingShowAtFirstLaunch |
---|
|
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 |
---|
| @objc
public var onboardingShowAtFirstLaunch: Bool |
|
Expand |
---|
title | customOnboardingPages |
---|
|
Sets custom onboarding pages. For your convenience we provide the OnboardingPage struct. Code Block |
---|
| public var customOnboardingPages: [OnboardingPage]? |
|
Expand |
---|
title | bottomNavigationBarEnabled |
---|
|
Enable/deactivate the bottom navigation bar. Code Block |
---|
| public var bottomNavigationBarEnabled: Bool |
|
Expand |
---|
title | helpNavigationBarBottomAdapter |
---|
|
Set an adapter implementation to show a custom bottom navigation bar on the help screens. Code Block |
---|
| public var helpNavigationBarBottomAdapter: HelpBottomNavigationBarAdapter? |
|
Expand |
---|
title | cameraNavigationBarBottomAdapter |
---|
|
Set an adapter implementation to show a custom bottom navigation bar on the camera screen. Code Block |
---|
| public var cameraNavigationBarBottomAdapter: CameraBottomNavigationBarAdapter? |
|
Expand |
---|
title | reviewNavigationBarBottomAdapter |
---|
|
Set an adapter implementation to show a custom bottom navigation bar on the review screen. Code Block |
---|
| public var reviewNavigationBarBottomAdapter: ReviewScreenBottomNavigationBarAdapter? |
|
Expand |
---|
title | imagePickerNavigationBarBottomAdapter |
---|
|
Set an adapter implementation to show a custom bottom navigation bar on the image picker screen. Code Block |
---|
| public var imagePickerNavigationBarBottomAdapter: ImagePickerBottomNavigationBarAdapter? |
|
Expand |
---|
title | onboardingNavigationBarBottomAdapter |
---|
|
Set an adapter implementation to show a custom bottom navigation bar on the onboarding screen. Code Block |
---|
| public var onboardingNavigationBarBottomAdapter: OnboardingNavigationBarBottomAdapter? |
|
Expand |
---|
title | onboardingAlignCornersIllustrationAdapter |
---|
|
Set an adapter implementation to show a custom illustration on the “align corners” onboarding page. Code Block |
---|
| public var onboardingAlignCornersIllustrationAdapter: OnboardingIllustrationAdapter? |
|
Expand |
---|
title | onboardingLightingIllustrationAdapter |
---|
|
Set an adapter implementation to show a custom illustration on the “lighting” onboarding page. Code Block |
---|
| public var onboardingLightingIllustrationAdapter: OnboardingIllustrationAdapter? |
|
Expand |
---|
title | onboardingMultiPageIllustrationAdapter |
---|
|
Set an adapter implementation to show a custom illustration on the “multi-page” onboarding page. Code Block |
---|
| public var onboardingMultiPageIllustrationAdapter: OnboardingIllustrationAdapter? |
|
Expand |
---|
title | onboardingQRCodeIllustrationAdapter |
---|
|
Set an adapter implementation to show a custom illustration on the “QR code” onboarding page. Code Block |
---|
| public var onboardingQRCodeIllustrationAdapter: OnboardingIllustrationAdapter? |
|
Expand |
---|
title | customLoadingIndicator |
---|
|
Set an adapter implementation to show a custom loading indicator on the document analysis screen. Code Block |
---|
| public var customLoadingIndicator: CustomLoadingIndicatorAdapter? |
|
Expand |
---|
title | onButtonLoadingIndicator |
---|
|
Set an adapter implementation to show a custom loading indicator on the buttons which support loading. Code Block |
---|
| public var onButtonLoadingIndicator: OnButtonLoadingIndicatorAdapter? |
|
Expand |
---|
title | navigationBarReviewTitleBackButton |
---|
|
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 |
---|
| @objc
public var navigationBarReviewTitleBackButton: String |
|
Expand |
---|
title | navigationBarReviewTitleCloseButton |
---|
|
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 |
---|
| @objc
public var navigationBarReviewTitleCloseButton: String |
|
Expand |
---|
title | navigationBarReviewTitleContinueButton |
---|
|
Sets the continue button text in the navigation bar on the review screen. Code Block |
---|
| @objc
public var navigationBarReviewTitleContinueButton: String |
|
Analysis options
Expand |
---|
title | navigationBarAnalysisTitleBackButton |
---|
|
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 |
---|
| @objc
public var navigationBarAnalysisTitleBackButton: String |
|
Help screens
Expand |
---|
title | navigationBarHelpMenuTitleBackToCameraButton |
---|
|
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 |
---|
| @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 |
---|
| @objc
public var navigationBarHelpScreenTitleBackToMenuButton: String |
|
Expand |
---|
title | shouldShowSupportedFormatsScreen |
---|
|
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 |
---|
| @objc
public var shouldShowSupportedFormatsScreen: Bool |
|
Open with tutorial options
Expand |
---|
title | openWithAppNameForTexts |
---|
|
Sets the text of the app name for the Open with tutorial texts. Code Block |
---|
| @objc
public var openWithAppNameForTexts: String |
|
Expand |
---|
title | shouldShowDragAndDropTutorial |
---|
|
Sets if the Drag&Drop step should be shown in the Open with tutorial. Code Block |
---|
| @objc
public var shouldShowDragAndDropTutorial: Bool |
|
Expand |
---|
|
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 |
---|
| public var customMenuItems: [HelpMenuItem] |
|
Expand |
---|
|
Sets if the default error logging implementation is on. Code Block |
---|
| @objc
public var giniErrorLoggerIsOn: Bool { get set } |
|
Expand |
---|
title | customGiniErrorLoggerDelegate |
---|
|
Sets if the custom error logging is implemented. Code Block |
---|
| public var customGiniErrorLoggerDelegate: GiniCaptureErrorLoggerDelegate? { get set } |
|
Expand |
---|
title | localizedStringsTableName |
---|
|
Should be set if the default name “Localizable.strings” are not used. Code Block |
---|
| public var localizedStringsTableName: String? |
|
Expand |
---|
|
Code Block |
---|
| @objc
public var closeButtonResource: PreferredButtonResource? |
|
Expand |
---|
|
Code Block |
---|
| @objc
public var helpButtonResource: PreferredButtonResource? |
|
Expand |
---|
title | backToCameraButtonResource |
---|
|
Code Block |
---|
| @objc
public var backToCameraButtonResource: PreferredButtonResource? |
|
Expand |
---|
title | backToMenuButtonResource |
---|
|
Code Block |
---|
| @objc
public var backToMenuButtonResource: PreferredButtonResource? |
|
Expand |
---|
|
Code Block |
---|
| @objc
public var nextButtonResource: PreferredButtonResource? |
|
Expand |
---|
title | cancelButtonResource |
---|
|
Code Block |
---|
| @objc
public var cancelButtonResource: PreferredButtonResource? |
|
Expand |
---|
|
Enables customization of a font for specific text styles. The change affects all screens where a specific text style is used. Code Block |
---|
| public func updateFont(_ font: UIFont, for textStyle: UIFont.TextStyle) |
Parametersfont
| 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 |
---|
title | cleanup(paymentRecipient:paymentReference:paymentPurpose:iban:bic:amountToPay:) |
---|
|
Functions for clean up Code Block |
---|
| public func cleanup(paymentRecipient: String,
paymentReference: String,
paymentPurpose: String,
iban: String,
bic: String,
amountToPay: ExtractionAmount) |
ParameterspaymentRecipient
| paymentRecipient description | paymentReference
| paymentReference description | iban
| iban description | bic
| bic description | amountToPay
| amountToPay description |
|
Find an example implementation here.