GiniCapture

@objc
public final class GiniCapture : NSObject

Convenience class to interact with the Gini Capture SDK.

The Gini Capture SDK provides views for capturing, reviewing and analysing documents.

By integrating this library in your application you can allow your users to easily take a picture of a document, review it and - by implementing the necessary callbacks - upload the document for analysis to the Gini Bank API.

The Gini Capture SDK can be integrated using the Screen API. The Screen API provides a fully pre-configured navigation controller for easy integration.

  • Sets a configuration which is used to customize the look and feel of the Gini Capture SDK, for example to change texts and colors displayed to the user.

    Declaration

    Swift

    @objc
    public class func setConfiguration(_ configuration: GiniConfiguration)

    Parameters

    configuration

    The configuration to set.

  • Returns a view controller which will handle the analysis process.

    Declaration

    Swift

    @objc
    public class func viewController(withDelegate delegate: GiniCaptureDelegate,
                                     importedDocuments: [GiniCaptureDocument]? = nil) -> UIViewController

    Parameters

    delegate

    An instance conforming to the GiniCaptureDelegate protocol.

    importedDocuments

    Documents that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.

    Return Value

    A presentable view controller.

  • Returns a view controller which will handle the analysis process.

    Declaration

    Swift

    public class func viewController(withDelegate delegate: GiniCaptureDelegate,
                                     importedDocuments: [GiniCaptureDocument]? = nil,
                                     trackingDelegate: GiniCaptureTrackingDelegate? = nil) -> UIViewController

    Parameters

    delegate

    An instance conforming to the GiniCaptureDelegate protocol.

    importedDocuments

    Documents that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.

    trackingDelegate

    A delegate object to receive user events

    Return Value

    A presentable view controller.

  • Returns a view controller which will handle the analysis process.

    Declaration

    Swift

    @objc
    public class func viewController(withDelegate delegate: GiniCaptureDelegate,
                                     importedDocument: GiniCaptureDocument? = nil) -> UIViewController

    Parameters

    delegate

    An instance conforming to the GiniCaptureDelegate protocol.

    importedDocument

    Documents that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.

    Return Value

    A presentable view controller.

  • Returns a view controller which will handle the analysis process.

    Declaration

    Swift

    public class func viewController(withDelegate delegate: GiniCaptureDelegate,
                                     importedDocument: GiniCaptureDocument? = nil,
                                     trackingDelegate: GiniCaptureTrackingDelegate? = nil) -> UIViewController

    Parameters

    delegate

    An instance conforming to the GiniCaptureDelegate protocol.

    importedDocument

    Documents that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.

    trackingDelegate

    A delegate object to receive user events

    Return Value

    A presentable view controller.

  • Returns a view controller which will handle the analysis process. Allows to set a custom configuration to change the look and feel of the Gini Capture SDK.

    Declaration

    Swift

    @objc
    public class func viewController(withDelegate delegate: GiniCaptureDelegate,
                                     withConfiguration configuration: GiniConfiguration,
                                     importedDocument: GiniCaptureDocument? = nil) -> UIViewController

    Parameters

    delegate

    An instance conforming to the GiniCaptureDelegate protocol.

    configuration

    The configuration to set.

    importedDocument

    Documents that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.

    Return Value

    A presentable view controller.

  • Returns a view controller which will handle the analysis process. Allows to set a custom configuration to change the look and feel of the Gini Capture SDK.

    Declaration

    Swift

    public class func viewController(withDelegate delegate: GiniCaptureDelegate,
                                     withConfiguration configuration: GiniConfiguration,
                                     importedDocument: GiniCaptureDocument? = nil,
                                     trackingDelegate: GiniCaptureTrackingDelegate? = nil) -> UIViewController

    Parameters

    delegate

    An instance conforming to the GiniCaptureDelegate protocol.

    configuration

    The configuration to set.

    importedDocument

    Documents that come from a source different than CameraViewController. There should be either images or one PDF, and they should be validated before calling this method.

    trackingDelegate

    A delegate object to receive user events

    Return Value

    A presentable view controller.

  • Returns the current version of the Gini Capture SDK. If there is an error retrieving the version the returned value will be an empty string.

    Declaration

    Swift

    @objc
    public static var versionString: String { get }
  • Validates a GiniCaptureDocument with a given GiniConfiguration.

    Throws

    DocumentValidationError if there was an error during the validation.

    Declaration

    Swift

    @objc
    public class func validate(_ document: GiniCaptureDocument,
                               withConfig giniConfiguration: GiniConfiguration) throws
  • Returns a view controller which will handle the analysis process. It’s the easiest way to get started with the Gini Capture SDK as it comes pre-configured and handles all screens and transitions out of the box, including the networking.

    Declaration

    Swift

    public class func viewController(withClient client: Client,
                                     importedDocuments: [GiniCaptureDocument]? = nil,
                                     configuration: GiniConfiguration,
                                     resultsDelegate: GiniCaptureResultsDelegate,
                                     documentMetadata: Document.Metadata? = nil,
                                     api: APIDomain = .default,
                                     userApi: UserDomain = .default,
                                     trackingDelegate: GiniCaptureTrackingDelegate? = nil) -> UIViewController

    Parameters

    client

    GiniClient with the information needed to enable document analysis

    resultsDelegate

    Results delegate object where you can get the results of the analysis.

    configuration

    The configuration to set.

    documentMetadata

    Additional HTTP headers to send when uploading documents

    api

    The Gini backend API to use. Supply .custom(“domain”) in order to specify a custom domain.

    userApi

    The Gini user backend API to use. Supply .custom(“domain”) in order to specify a custom domain.

    trackingDelegate

    A delegate object to receive user events

    Return Value

    A presentable view controller.

  • Returns a view controller which will handle the analysis process. It’s the easiest way to get started with the Gini Capture SDK as it comes pre-configured and handles all screens and transitions out of the box with the custom networking.

    Note

    Screen API with custom networking only.

    Declaration

    Swift

    public class func viewController(importedDocuments: [GiniCaptureDocument]? = nil,
                                     configuration: GiniConfiguration,
                                     resultsDelegate: GiniCaptureResultsDelegate,
                                     documentMetadata: Document.Metadata? = nil,
                                     trackingDelegate: GiniCaptureTrackingDelegate? = nil,
                                     networkingService: GiniCaptureNetworkService) -> UIViewController

    Parameters

    importedDocuments

    There should be either images or one PDF, and they should be validated before calling this method.

    resultsDelegate

    Results delegate object where you can get the results of the analysis.

    configuration

    The configuration to set.

    documentMetadata

    Additional HTTP headers to send when uploading documents.

    trackingDelegate

    A delegate object to receive user events.

    networkingService

    A delegate object which implement protocol for the document processing events.

    Return Value

    A presentable view controller.

  • Undocumented

    Declaration

    Swift

    public class func removeStoredCredentials(for client: Client) throws