Skip to end of banner
Go to start of banner

Configuration

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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 the Gini Capture SDK. For Gini Capture SDK used GiniConfiguration.shared() singleton.

@objc
public final class GiniConfiguration : NSObject

The GiniConfiguration class allows customizations to the look and feel of Gini Capture SDK. 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.

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.


 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
  • none

    case none
  • pdf

    case pdf
  • pdf_and_images

    case pdf_and_images

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)

Button configuration options


Here you can find an example implementation.

  • No labels