Classes
The following classes are available globally.
-
Information about the scanned barcode of an identification document
See moreDeclaration
Swift
@objc open class DSBarcodeDocumentData : NSObject, DSDocumentData
-
Information about the scanned MRZ of an identification document
See moreDeclaration
Swift
@objc open class DSMRZDocumentData : NSObject, DSDocumentData
-
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
See moreclass 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 } }
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 moreDeclaration
Swift
@objc public class DSOptions : NSObject
-
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 moreDeclaration
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:
See moreif let error = resut.error { //do something with the error } if let capturedImage = result.image { ... }
Declaration
Swift
@objc open class DSResult : NSObject
-
Undocumented
See moreDeclaration
Swift
public class ScanViewController : UIViewController
extension ScanViewController: UIAdaptivePresentationControllerDelegate