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 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.

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 in GiniCapture 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.
  • Supported document types by Gini Capture SDK.

    See more

    Declaration

    Swift

    @objc
    public enum GiniCaptureImportFileTypes : Int
  • Returns a GiniConfiguration instance which allows to set individual configurations to change the look and feel of the Gini Capture SDK.

    Declaration

    Swift

    public override init()

    Return Value

    Instance of GiniConfiguration.

  • 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)
  • 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 tint color of the navigation bar in all screens of the Gini Capture SDK to the globally specified color or to a default color.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var navigationBarTintColor: UIColor
  • Sets the tint color of all navigation items in all screens of the Gini Capture SDK to the globally specified color.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var navigationBarItemTintColor: UIColor?
  • Sets the font of all navigation items in all screens of the Gini Capture SDK to the globally specified font or a default font.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var navigationBarItemFont: UIFont
  • Sets the title color in the navigation bar in all screens of the Gini Capture SDK to the globally specified color or to a default color.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var navigationBarTitleColor: UIColor
  • Sets the title font in the navigation bar in all screens of the Gini Capture SDK to the globally specified font or to a default font.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var navigationBarTitleFont: UIFont
  • Sets the tint color of the UIDocumentPickerViewController navigation bar.

    Note

    Use only if you have a custom UIAppearance for your UINavigationBar

    Note

    Only iOS >= 11.0

    Declaration

    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 the status bar style in the Gini Capture SDK.

    Note

    If UIViewControllerBasedStatusBarAppearance is set to false in the Info.plist, it may not work in future versions of iOS since the UIApplication.setStatusBarStyle method was deprecated on iOS 9.0.

    Declaration

    Swift

    @objc
    public var statusBarStyle: UIStatusBarStyle
  • Sets the continue button text in the navigation bar on the onboarding screen.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var navigationBarOnboardingTitleContinueButton: String
  • Sets the color of the page controller’s page indicator items.

    Declaration

    Swift

    @objc
    public var onboardingPageIndicatorColor: GiniColor
  • Sets the color of the page controller’s current page indicator item.

    Declaration

    Swift

    @objc
    public var onboardingCurrentPageIndicatorColor: GiniColor
  • Sets alpha to the color of the page controller’s current page indicator item.

    Declaration

    Swift

    @objc
    public var onboardingCurrentPageIndicatorAlpha: CGFloat
  • Indicates whether the onboarding screen should be presented at each start of the Gini Capture SDK.

    Note

    Screen API only.

    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

    Overwrites onboardingShowAtLaunch for the first launch.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var onboardingShowAtFirstLaunch: Bool
  • Sets the color ot the text for all onboarding pages.

    Declaration

    Swift

    @objc
    public var onboardingTextColor: GiniColor
  • Sets the background color for all onboarding pages.

    Declaration

    Swift

    @objc
    public var onboardingScreenBackgroundColor: GiniColor
  • All onboarding pages which will be presented in a horizontal scroll view to the user. By default the Gini Capture SDK comes with three pages advising the user to keep the document flat, hold the device parallel and capture the whole document.

    Note

    Any array of views can be passed, but for your convenience we provide the GINIOnboardingPage class.

    Declaration

    Swift

    @objc
    public var onboardingPages: [UIView] { get set }
  • Sets the back button text in the navigation bar on the review screen. Use this if you only want to show the title.

    Note

    Screen API only.

    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.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var navigationBarReviewTitleCloseButton: String
  • Sets the continue button text in the navigation bar on the review screen.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var navigationBarReviewTitleContinueButton: String
  • Sets the background color of the bottom section on the review screen containing the rotation button.

    Note

    Background will have a 20% transparency, to have enough space for the document image on smaller devices.

    Declaration

    Swift

    @objc
    public var reviewBottomViewBackgroundColor: UIColor
  • Sets the font of the text appearing at the bottom of the review screen.

    Declaration

    Swift

    @objc
    public var reviewTextBottomFont: UIFont
  • Sets the color of the text appearing at the bottom of the review screen.

    Declaration

    Swift

    @objc
    public var reviewTextBottomColor: UIColor
  • Sets the color of the loading indicator on the analysis screen to the specified color.

    Declaration

    Swift

    @objc
    public var analysisLoadingIndicatorColor: UIColor
  • Sets the color of the PDF information view on the analysis screen to the specified color.

    Declaration

    Swift

    @objc
    public var analysisPDFInformationBackgroundColor: UIColor
  • Sets the color of the PDF information view on the analysis screen to the specified color.

    Declaration

    Swift

    @objc
    public var analysisPDFInformationTextColor: UIColor
  • Sets the back button text in the navigation bar on the analysis screen. Use this if you only want to show the title.

    Note

    Screen API only.

    Declaration

    Swift

    @objc
    public var navigationBarAnalysisTitleBackButton: String
  • Sets the background color for all help screens.

    Declaration

    Swift

    @objc
    public var helpScreenBackgroundColor: GiniColor
  • Sets the background color for the cells on help screen.

    Declaration

    Swift

    @objc
    public var helpScreenCellsBackgroundColor: GiniColor
  • Sets the back button text in the navigation bar on the help menu screen. Use this if you only want to show the title.

    Note

    Screen API only.

    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.

    Note

    Screen API only.

    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 color of the unsupported formats icon background to the specified color.

    Declaration

    Swift

    @objc
    public var nonSupportedFormatsIconColor: UIColor
  • Sets the color of the supported formats icon background to the specified color.

    Declaration

    Swift

    @objc
    public var supportedFormatsIconColor: UIColor
  • Sets the text of the app name for the Open with tutorial texts.

    Declaration

    Swift

    @objc
    public var openWithAppNameForTexts: String
  • Sets the color of the step indicator for the Open with tutorial.

    Declaration

    Swift

    @objc
    public var stepIndicatorColor: UIColor
  • Sets the color of the bottom button to the specified color.

    Declaration

    Swift

    @objc
    public var noResultsBottomButtonColor: UIColor
  • Sets the text color of the bottom button to the specified color.

    Declaration

    Swift

    @objc
    public var noResultsBottomButtonTextColor: GiniColor
  • Sets the corner radius of the bottom button.

    Declaration

    Swift

    @objc
    public var noResultsBottomButtonCornerRadius: CGFloat
  • Sets the color of the warning container background to the specified color.

    Declaration

    Swift

    @objc
    public var noResultsWarningContainerIconColor: UIColor
  • Sets if the Drag&Drop step should be shown in the “Open with” tutorial.

    Declaration

    Swift

    @objc
    public var shouldShowDragAndDropTutorial: Bool