PhilippinesSeafarerIdentificationDocumentModel
A class derived from DocumentModel containing details specific to the Philippines seafarer identification document
Declaration
Only relevant details are shown, boilerplate or standard Swift generated code is omitted
Summary
Public variables
Public methods
Public variables
mrzLine1
@objc final public var mrzLine1: String? { get }
Example: "I<UTOD231458907<<<<<<<<<<<<<<<"
The top MRZ line of the document.
mrzLine2
@objc final public var mrzLine2: String? { get }
Example: "7408122F1204159UTO<<<<<<<<<<<6"
The middle MRZ line of the document.
mrzLine3
@objc final public var mrzLine3: String? { get }
Example: "ERIKSSON<<ANNA<MARIA<<<<<<<<<<"
The bottom MRZ line of the document.
documentType
@objc final public var documentType: String? { get }
Example: "IS"
The document type as extracted from the MRZ.
issuingCountryCode
@objc final public var issuingCountryCode: String? { get }
Example: "PHL"
The country code that issued the document.
identityNumber
@objc final public var identityNumber: String? { get }
Example: "123456789"
The identity number as extracted from the MRZ.
identityNumberCheckDigit
@objc final public var identityNumberCheckDigit: Int { get }
Example: 1
A check digit, used to verify the OCR integrity of the identity number.
optionalData1
@objc final public var optionalData1: String? { get }
Example: "A1B2C3D4"
Uncategorized data found on the MRZ top line.
dateOfBirth
@objc final public var dateOfBirth: Date? { get }
Example: 1990/01/01
The date of birth of the subject as extracted from the MRZ.
dateOfBirthCheckDigit
@objc final public var dateOfBirthCheckDigit: Int { get }
Example: 1
A check digit, used to verify the OCR integrity of the date of birth.
sex
@objc final public var sex:
Sex
{ get }
Example: Sex.Female
The sex of the subject as extracted from the MRZ.
dateOfExpiry
@objc final public var dateOfExpiry: Date? { get }
Example: 1990/01/01
The date of expiry of the document as extracted from the MRZ.
dateOfExpiryCheckDigit
@objc final public var dateOfExpiryCheckDigit: Int { get }
Example: 1
A check digit, used to verify the OCR integrity of the date of expiry.
nationality
@objc final public var nationality: String? { get }
Example: "PHL"
The nationality country code of the subject as extracted from the MRZ.
optionalData2
@objc final public var optionalData2: String? { get }
Example: "A1B2C3D4"
Uncategorized data found on the MRZ middle line.
compositeCheckDigit
@objc final public var compositeCheckDigit: Int { get }
Example: 1
A check digit, used to verify the OCR integrity of the entire MRZ.
surname
@objc final public var surname: String? { get }
Example: "DOE"
The surname of the subject as extracted from the MRZ.
names
@objc final public var names: String? { get }
Example: "JOHN"
The names of the subject as extracted from the MRZ.
portraitBackImage
@objc final public var portraitBackImage: UIImage? { get }
The cropped version of documentBackImage, containing just the face.
documentBackImage
@objc final public var documentBackImage: UIImage? { get }
Contains an original image of the back side of the document.
croppedDocumentBackImage
@objc final public var croppedDocumentBackImage: UIImage? { get }
The cropped version of documentBackImage, containing just the document.
portraitBackImagePath
@objc final public var portraitBackImagePath: String? { get }
The path to portraitBackImage, after it is saved. Otherwise nil.
documentBackImagePath
@objc final public var documentBackImagePath: String? { get }
The path to documentBackImage, after it is saved. Otherwise nil.
croppedDocumentBackImagePath
@objc final public var croppedDocumentBackImagePath: String? { get }
The path to croppedDocumentBackImage, after it is saved. Otherwise nil.
Public methods
saveImages()
@objc override final public func saveImages()
This function also calls its super function
Saves the portraitBackImage, documentBackImage and croppedDocumentBackImage and populates their respective path variables.
encode(to encoder: Encoder)
override final public func encode(to encoder: Encoder) throws
This function also calls its super function
Encodes the model using the encoder provided. Used to convert the model to JSON.