Skip to content

VDDocumentCaptureProtocol

Protocol that communicates this framework with an app/framework/library that uses it.

Currently all methods are required.

Public Methods

- (void)VDDocumentCaptured:(NSData*)imageData withCaptureType:(VDCaptureType)captureType andDocument:(NSArray<VDDocument*>*)document

Delegate method which will notify when each of the document images is captured.

The image is compressed as a jpeg with 50% of quality compression.

  • Parameters:

    • imageData: Contains the data of the document image captured.
    • captureType: The type of capture with which the image has been taken.
    • document: The possible documents to which the image has been taken.
- (void)VDDocumentAllFinished:(Boolean)processFinished

Delegate method which will notify when the process has finished completely

This method will be called always at the end of the process or when stop has been called when everything is stopped.

  • Parameters:

    • processFinished: Indicates if the process has finished successfully (true) or has been interrupted (false).
- (void)VDTimeWithoutPhotoTaken:(int)seconds withCaptureType:(VDCaptureType)capture

Delegate method which will notify when pass more than X seconds without taking the photo.

  • Parameters:

    • seconds: Time without taking the photo in seconds.
    • capture: The type of capture when the time passed.