Document Import Guide


If you want to add the document import feature to your app, specify the supported types (fileImportSupportedTypes) on the GiniBankConfiguration instance.

let giniBankConfiguration = GiniBankConfiguration.shared giniBankConfiguration.fileImportSupportedTypes = .pdf_and_images

These are the cases for document import:

  • pdf

  • pdf_and_images

  • none (In case you want to deactivate document import functionality, including UI related, this is the default value).

Also, if you want to add some custom validations for the imported GiniCaptureDocument, specify them in the GiniBankConfiguration closure, customDocumentValidations, for example:

giniBankConfiguration.customDocumentValidations = { document in // As an example of custom document validation, we add a more strict check for file size let maxFileSize = 5 * 1024 * 1024 // 5MB if document.data.count > maxFileSize { throw DocumentValidationError.custom(message: "Diese Datei ist leider größer als 5MB") } }

Import images from camera roll

To enable your app to import images from Photo Gallery, specify the NSPhotoLibraryUsageDescription key in your Info.plist file. This key is mandatory for all apps since iOS 10 when accessing the Photo Gallery.

Import images and PDF files from other apps

In order to enable your app to import PDF files and images from other apps like Dropbox, iCloud, or Drive, enable iCloud document support in your app.

For more information take a look at Incorporating iCloud into Your App guide from Apple documentation.