Comment on page
IDCardModel
A class derived from DocumentModel containing details pertaining to all ID card documents
@objc public class IDCardModel : DocumentModel {
@objc public var fullName: String? { get }
@objc public var sex: Sex { get }
@objc public var nationality: String? { get }
@objc public var identityNumber: String? { get }
@objc public var dateOfBirth: Date? { get }
@objc public var portraitBackImage: UIImage? { get }
@objc public var documentBackImage: UIImage? { get }
@objc public var croppedDocumentBackImage: UIImage? { get }
@objc public var portraitBackImagePath: String? { get }
@objc public var documentBackImagePath: String? { get }
@objc public var croppedDocumentBackImagePath: String? { get }
@objc override public func saveImages()
override public func encode(to encoder: Encoder) throws
}
Only relevant details are shown, boilerplate or standard Swift generated code is omitted
Name | Type | Description | Data source |
String? | The full name of the subject as found on the ID card document. | OCR / MRZ / Barcode | |
The sex of the subject as found on the ID card document. | OCR / MRZ / Barcode | ||
String? | The nationality of the subject as found on the ID card document. | OCR / MRZ / Barcode | |
String? | The identity number of the subject as found on the ID card document. | OCR / MRZ / Barcode | |
Date? | The date of birth of the subject as found on the ID card document. | OCR / MRZ / Barcode | |
UIImage? | Back of document | ||
UIImage? | Contains an original image of the back side of the document. | Back of document | |
UIImage? | Back of document | ||
String? | Local storage | ||
String? | Local storage | ||
String? | Local storage |
Signature | Return Type | Description |
Void | Saves the portraitBackImage, documentBackImage and croppedDocumentBackImage and populates their respective path variables. | |
Void | Encodes the model using the encoder provided. Used to convert the model to JSON. |
@objc public var fullName: String? { get }
Example:
"John Doe"
The full name of the subject as found on the ID card document.
Example:
Sex.Male
The sex of the subject as found on the ID card document.
@objc public var nationality: String? { get }
Example:
"RSA"
The nationality of the subject as found on the ID card document.
@objc public var identityNumber: String? { get }
Example:
"010203040506"
The identity number of the subject as found on the ID card document.
@objc public var dateOfBirth: Date? { get }
Example:
1990/01/01
The date of birth of the subject as found on the ID card document.
@objc public var portraitBackImage: UIImage? { get }
@objc public var documentBackImage: UIImage? { get }
Contains an original image of the back side of the document.
@objc public var croppedDocumentBackImage: UIImage? { get }
@objc public var portraitBackImagePath: String? { get }
@objc public var documentBackImagePath: String? { get }
@objc public var croppedDocumentBackImagePath: String? { get }
@objc override public func saveImages()
Saves the portraitBackImage, documentBackImage and croppedDocumentBackImage and populates their respective path variables.
override public func encode(to encoder: Encoder) throws
Encodes the model using the encoder provided. Used to convert the model to JSON.
Last modified 1yr ago