BiometricsModel

A base class containing images for a scanned face

Declaration

@objc public class BiometricsModel : NSObject, Encodable {
    @objc public var selfieImage: UIImage? { get }
    @objc public var croppedSelfieImage: UIImage? { get }
    @objc public var selfieImagePath: String? { get }
    @objc public var croppedSelfieImagePath: String? { get }
    
    @objc public func saveImages()
    public func encode(to encoder: Encoder) throws
}

Only relevant details are shown, boilerplate or standard Swift generated code is omitted

Summary

Public variables

Public methods

Public variables

selfieImage

@objc public var selfieImage: UIImage? { get }

Contains an original image of the subject's face.

croppedSelfieImage

@objc public var croppedSelfieImage: UIImage? { get }

The cropped version of selfieImage, containing just the face.

selfieImagePath

@objc public var selfieImagePath: String? { get }

The path to selfieImage, after it is saved. Otherwise nil.

croppedSelfieImagePath

@objc public var croppedSelfieImagePath: String? { get }

The path to croppedSelfieImage, after it is saved. Otherwise nil.

Public methods

saveImages()

@objc public func saveImages()

Saves the selfieImage and croppedSelfieImage and populates their respective path variables.

encode(to encoder: Encoder)

public func encode(to encoder: Encoder) throws

Encodes the model using the encoder provided. Used to convert the model to JSON.

Where this is used

Last updated