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
  • 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(viewController: self, delegate: self)
    }
    
    func doScan() {
       let options = DSID1Options()
       options.side = .Back
       options.detectFace = false
       documentScanHandler?.options = options
       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
  • Undocumented

    See more

    Declaration

    Swift

    public class ScanViewController : UIViewController
    extension ScanViewController: UIAdaptivePresentationControllerDelegate