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