Classes

The following classes are available globally.

  • Information about the scanned barcode of an identification document

    See more

    Declaration

    Swift

    @objc
    open class DSBarcodeDocumentData : NSObject, DSDocumentData
  • Information about the scanned MRZ of an identification document

    See more

    Declaration

    Swift

    @objc
    open class DSMRZDocumentData : NSObject, DSDocumentData
  • Used to provided details about captured image and whether certain aspects of the capture meet minimum thresholds for ID verification processing.

    Discussion: Confidence scores should not be considered, a 0.40 (or 40% confidence) could be acceptable in certain situations, however higher values will indicate better results.

    It’s also generally suggested to use the overall DSResult.confidence score for checking whether an image needs to be recaptured while using this class to determine what actions a user may need to take to correct a bad capture.

    See more

    Declaration

    Swift

    @objc
    open class CaptureAnalysis : NSObject
  • Works with visual assests of a device to scan identification documents and extract identification document data

    For information on how to scan a document please see the DSCapture class

    See more

    Declaration

    Swift

    @objc
    public class DSCapture : NSObject
  • A handler that scans and tries to detect the specified type of document

    Discussion: A handler that scans for configured types of documents. For example when a option of passport is given to the handler it will try to scan for passports using some detection methods tailored to passports. This doesn’t mean it won’t detect objects that are passport like, but the algorithums are optimized for the given configuration.

    Example Usage:

    class SomeController: UIViewController {
    ...
    private let documentScanHandler: DSHandler!
    
    func viewDidLoad() {
       super.viewDidLoad()
       documentScanHandler = DSHandler(delegate: self)
    }
    
    func doScan() {
       let options = DSID1Options()
       options.side = .Back
       options.detectFace = false
       documentScanHandler?.options = options
       self.present(documentScanHandler.scanController, animated: true)
       documentScanHandler?.start()
    }
    ...
    }
    
    extension: DSHandlerDelegate {
       func handleScan(result: DSResult) {
               //do something with result
       }
    }
    
    See more

    Declaration

    Swift

    @objc
    open class DSHandler : NSObject
  • A configuration object that indicates how the document scan should behave

    Discussion

    DSOptions store configuration options for a specific types of document scans. These configurations can very by scan type. For example an ID1 configuration may contain different configuration options than a passport configuration

    The type of options passed to the DSHandler determine how and what the scan will try to detect.

    See more

    Declaration

    Swift

    @objc
    public class DSOptions : NSObject
  • Configuration options for scanning Passports

    See more

    Declaration

    Swift

    @objc
    public class DSPassportOptions : DSOptions
  • Configuration options for scanning ID1 documents

    See more

    Declaration

    Swift

    @objc
    public class DSID1Options : DSOptions
  • An informational error related to the users attempt for a capture.

    Discussion: A DSScanError can be return for things that are preventing a good capture. For example if the user is too far away from a document, then an error could be return stating that the user is too far away.

    It is up to the application on how it wants to display that information to the user.

    See more

    Declaration

    Swift

    @objc
    public class DSError : NSObject
  • A capture result representing an attempt to capture an object. The result will return all information about the capture attempt including any captured images.

    Example Usage:

    if let error = resut.error {
       //do something with the error
    }
    
    if let capturedImage = result.image {
       ...
    }
    
    See more

    Declaration

    Swift

    @objc
    open class DSResult : NSObject
  • A Passport specitic scan result.

    See more

    Declaration

    Swift

    @objc
    open class DSPassportResult : DSResult
  • An ID1 specific scan result.

    See more

    Declaration

    Swift

    @objc
    open class DSID1Result : DSResult
  • Configuration options for Dynamic Capture Feedback during Auto-Capture sessions

    During Auto-Capture, corrective suggestions to improve capture quality can be interactively displayed to the end-user. This is called “Dynamic Capture Feedback.” Enabling Dynamic Capture Feedback also unlocks additional detectors, resulting in higher-quality captures and less round-trips from your application to the SDK.

    Important

    DSOptions.captureType must be set to .Auto in order for Dynamic Capture Feedback to be available.
    See more

    Declaration

    Swift

    @objc
    public class DynamicCaptureFeedbackOptions : NSObject
  • Document-specific configuration options of enforced detectors during Dynamic Capture Feedback

    See more

    Declaration

    Swift

    @objc
    public class DynamicCaptureFeedbackDetectionOptions : NSObject
  • A view controller used to present the capture view for an ID scan session.

    Discussion: This UIViewController is intended to be used when a scan is started. The controller can be presented in many ways, it can be used as a child view controller while presenting the with other views within the parent controller hierarchy or presented from a parent view controller to give a full screen capture experience

    Example Usage:

    class SomeController: UIViewController {
    ...
    private let documentScanHandler: DSHandler!
    
    func viewDidLoad() {
       super.viewDidLoad()
       documentScanHandler = DSHandler(delegate: self)
    }
    
    func doScan() {
       let options = DSID1Options()
       options.side = .Back
       options.detectFace = false
       documentScanHandler?.options = options
       self.present(documentScanHandler.scanController, animated: true)
       documentScanHandler?.start()
    }
    ...
    }
    
    extension: DSHandlerDelegate {
       func handleScan(result: DSResult) {
               //do something with result
       }
    }
    
    See more

    Declaration

    Swift

    public class ScanViewController : UIViewController
    extension ScanViewController: UIAdaptivePresentationControllerDelegate