GiniConfiguration
@objc
public final class GiniConfiguration : NSObject
The GiniConfiguration
class allows customizations to the look and feel of the Gini Capture SDK.
If there are limitations regarding which API can be used, this is clearly stated for the specific attribute.
Note
Text can also be set by using the appropriate keys in aLocalizable.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.
Note
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 inGiniCapture
bundle.
Attention
If there are conflicting pairs of image and text for an interface element (e.g.navigationBarCameraTitleCloseButton
) the image will always be preferred,
while making sure the accessibility label is set.
-
Singleton to make configuration internally accessible in all classes of the Gini Capture SDK.
Declaration
Swift
public static var shared: GiniConfiguration
-
Supported document types by Gini Capture SDK.
See moreDeclaration
Swift
@objc public enum GiniCaptureImportFileTypes : Int
-
Sets custom validations that can be done apart from the default ones (file size, file type…). It should throw a
CustomDocumentValidationError
error.Declaration
Swift
@objc public var customDocumentValidations: ((GiniCaptureDocument) -> CustomDocumentValidationResult)
-
Undocumented
Declaration
Swift
public lazy var primaryButtonConfiguration: ButtonConfiguration { get set }
-
Undocumented
Declaration
Swift
public lazy var secondaryButtonConfiguration: ButtonConfiguration { get set }
-
Undocumented
Declaration
Swift
public lazy var transparentButtonConfiguration: ButtonConfiguration { get set }
-
Undocumented
Declaration
Swift
public lazy var cameraControlButtonConfiguration: ButtonConfiguration { get set }
-
Undocumented
Declaration
Swift
public lazy var addPageButtonConfiguration: ButtonConfiguration { get set }
-
Sets the font used in the GiniCapture library by default.
Declaration
Swift
@objc public lazy var customFont: GiniCaptureFont { get set }
-
Can be turned on during development to unlock extra information and to save captured images to camera roll.
Warning
Should never be used outside of a development enviroment.Declaration
Swift
@objc public var debugModeOn: Bool
-
Used to handle all the logging messages in order to log them in a different way.
Declaration
Swift
@objc public var logger: GiniLogger
-
Indicates whether the multipage feature is enabled or not. In case of
true
, multiple pages can be processed, showing a different review screen when capturing.Declaration
Swift
@objc public var multipageEnabled: Bool
-
Sets the custom navigation view controller as a root view controller for Gini Capture SDK screens.
Declaration
Swift
@objc public var customNavigationController: UINavigationController?
-
Sets the tint color of the UIDocumentPickerViewController navigation bar.
Note
Use only if you have a customUIAppearance
for your UINavigationBarDeclaration
Swift
@objc public var documentPickerNavigationBarTintColor: UIColor?
-
Sets the background color of an informal notice. Notices are small pieces of information appearing underneath the navigation bar.
Declaration
Swift
@objc public var noticeInformationBackgroundColor: UIColor
-
Sets the text color of an informal notice. Notices are small pieces of information appearing underneath the navigation bar.
Declaration
Swift
@objc public var noticeInformationTextColor: UIColor
-
Sets the background color of an error notice. Notices are small pieces of information appearing underneath the navigation bar.
Declaration
Swift
@objc public var noticeErrorBackgroundColor: UIColor
-
Sets the text color of an error notice. Notices are small pieces of information appearing underneath the navigation bar.
Declaration
Swift
@objc public var noticeErrorTextColor: UIColor
-
Indicates whether the open with feature is enabled or not. In case of
true
, a new option with the open with tutorial wil be shown in the Help menu.Declaration
Swift
@objc public var openWithEnabled: Bool
-
Indicates whether the QR Code scanning feature is enabled or not.
Declaration
Swift
@objc public var qrCodeScanningEnabled: Bool
-
Indicates whether only the QR Code scanning feature is enabled or not.
Declaration
Swift
@objc public var onlyQRCodeScanningEnabled: Bool
-
Indicates the status bar style in the Gini Capture SDK.
Declaration
Swift
@objc public var statusBarStyle: UIStatusBarStyle
-
Sets the color of the loading indicator on the camera screen to the specified color.
Declaration
Swift
@objc public var cameraSetupLoadingIndicatorColor: UIColor
-
Set the types supported by the file import feature.
GiniCaptureImportFileTypes.none
by default.Declaration
Swift
@objc public var fileImportSupportedTypes: GiniCaptureImportFileTypes
-
Indicates whether the flash toggle should be shown in the camera screen.
Declaration
Swift
@objc public var flashToggleEnabled: Bool
-
When the flash toggle is enabled, this flag indicates if the flash is on by default.
Declaration
Swift
@objc public var flashOnByDefault: Bool
-
Sets the close button text in the navigation bar on the camera screen.
Declaration
Swift
@objc public var navigationBarCameraTitleCloseButton: String
-
Sets the help button text in the navigation bar on the camera screen.
Declaration
Swift
@objc public var navigationBarCameraTitleHelpButton: String
-
Sets the continue button text in the navigation bar on the onboarding screen.
Declaration
Swift
@objc public var navigationBarOnboardingTitleContinueButton: String
-
Indicates whether the onboarding screen should be presented at each start of the Gini Capture SDK.
Declaration
Swift
@objc public var onboardingShowAtLaunch: Bool
-
Indicates whether the onboarding screen should be presented at the first start of the Gini Capture SDK. It is advised to do so.
Note
OverwritesonboardingShowAtLaunch
for the first launch.Declaration
Swift
@objc public var onboardingShowAtFirstLaunch: Bool
-
Set custom onboarding pages
Note
For your convenience we provide theOnboardingPage
struct.Declaration
Swift
public var customOnboardingPages: [OnboardingPage]?
-
Enable/disable the bottom navigation bar.
Declaration
Swift
public var bottomNavigationBarEnabled: Bool
-
Set an adapter implementation to show a custom bottom navigation bar on the help screens.
Declaration
Swift
public var helpNavigationBarBottomAdapter: HelpBottomNavigationBarAdapter?
-
Set an adapter implementation to show a custom bottom navigation bar on the camera screen.
Declaration
Swift
public var cameraNavigationBarBottomAdapter: CameraBottomNavigationBarAdapter?
-
Set an adapter implementation to show a custom bottom navigation bar on the review screen.
Declaration
Swift
public var reviewNavigationBarBottomAdapter: ReviewScreenBottomNavigationBarAdapter?
-
Set an adapter implementation to show a custom bottom navigation bar on the image picker screen.
Declaration
Swift
public var imagePickerNavigationBarBottomAdapter: ImagePickerBottomNavigationBarAdapter?
-
Set an adapter implementation to show a custom bottom navigation bar on the onboarding screen.
Declaration
Swift
public var onboardingNavigationBarBottomAdapter: OnboardingNavigationBarBottomAdapter?
-
Set an adapter implementation to show a custom illustration on the “align corners” onboarding page.
Declaration
Swift
public var onboardingAlignCornersIllustrationAdapter: OnboardingIllustrationAdapter?
-
Set an adapter implementation to show a custom illustration on the “lighting” onboarding page.
Declaration
Swift
public var onboardingLightingIllustrationAdapter: OnboardingIllustrationAdapter?
-
Set an adapter implementation to show a custom illustration on the “multi-page” onboarding page.
Declaration
Swift
public var onboardingMultiPageIllustrationAdapter: OnboardingIllustrationAdapter?
-
Set an adapter implementation to show a custom illustration on the “QR code” onboarding page.
Declaration
Swift
public var onboardingQRCodeIllustrationAdapter: OnboardingIllustrationAdapter?
-
Set an adapter implementation to show a custom loading indicator on the document analysis screen.
Declaration
Swift
public var customLoadingIndicator: CustomLoadingIndicatorAdapter?
-
Set an adapter implementation to show a custom loading indicator on the buttons which support loading.
Declaration
Swift
public var onButtonLoadingIndicator: OnButtonLoadingIndicatorAdapter?
-
Sets the back button text in the navigation bar on the review screen. Use this if you only want to show the title.
Declaration
Swift
@objc public var navigationBarReviewTitleBackButton: String
-
Sets the close button text in the navigation bar on the review screen. Use this if you only want to show the title.
Declaration
Swift
@objc public var navigationBarReviewTitleCloseButton: String
-
Sets the continue button text in the navigation bar on the review screen.
Declaration
Swift
@objc public var navigationBarReviewTitleContinueButton: String
-
Sets the back button text in the navigation bar on the analysis screen. Use this if you only want to show the title.
Declaration
Swift
@objc public var navigationBarAnalysisTitleBackButton: String
-
Sets the back button text in the navigation bar on the help menu screen. Use this if you only want to show the title.
Declaration
Swift
@objc public var navigationBarHelpMenuTitleBackToCameraButton: String
-
Sets the back button text in the navigation bar on the help screen. Use this if you only want to show the title.
Declaration
Swift
@objc public var navigationBarHelpScreenTitleBackToMenuButton: String
-
Indicates whether the supported format screens should be shown. In case of
false
, the option won’t be shown in the Help menu.Declaration
Swift
@objc public var shouldShowSupportedFormatsScreen: Bool
-
Sets the text of the app name for the Open with tutorial texts.
Declaration
Swift
@objc public var openWithAppNameForTexts: String
-
Sets if the Drag&Drop step should be shown in the “Open with” tutorial.
Declaration
Swift
@objc public var shouldShowDragAndDropTutorial: Bool
-
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.Declaration
Swift
public var customMenuItems: [HelpMenuItem]
-
Sets if the default error logging implementation is on.
Declaration
Swift
@objc public var giniErrorLoggerIsOn: Bool { get set }
-
Should sets if the custom error logging is implemented.
Declaration
Swift
public var customGiniErrorLoggerDelegate: GiniCaptureErrorLoggerDelegate? { get set }
-
Should be set if the default name “Localizable.strings” are not used.
Declaration
Swift
public var localizedStringsTableName: String?
-
Undocumented
Declaration
Swift
@objc public var closeButtonResource: PreferredButtonResource?
-
Undocumented
Declaration
Swift
@objc public var helpButtonResource: PreferredButtonResource?
-
Undocumented
Declaration
Swift
@objc public var backToCameraButtonResource: PreferredButtonResource?
-
Undocumented
Declaration
Swift
@objc public var backToMenuButtonResource: PreferredButtonResource?
-
Undocumented
Declaration
Swift
@objc public var nextButtonResource: PreferredButtonResource?
-
Undocumented
Declaration
Swift
@objc public var cancelButtonResource: PreferredButtonResource?
-
Allows setting a custom font for specific text styles. The change will affect all screens where a specific text style was used.
Declaration
Swift
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
-
Function for clean up
Declaration
Swift
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
-
Enum that represents entry points used for launching the SDK.
See moreDeclaration
Swift
public enum GiniEntryPoint : Int
-
Set the entry point used for launching the Gini Capture SDK. Default value is
GiniEntryPoint.button
.Declaration
Swift
public var entryPoint: GiniEntryPoint