Predefined steps

All our frameworks have predefined steps which can be easily used. Almost all steps have configs and inputs. In this section, I will describe all available steps in the current framework, their configs and will show how they look like.

Right now all steps localized in Russian and English.

Intro

This step is intro for other steps in the chain.

Input:

  • config

public var image: UIImage?
public var title: String?
public var attributedTitle: NSAttributedString?
public var description: String?
public var mainBtnTint: UIColor
public var mainBtnTitle: String?

Config

Config has predefined static variables:

startVerification

rfid

liveness

world

selfieWithDoc

signature

Confirm

You can use this step in the end of the process.

Input:

  • config

public var title: String
public var description: String
public var image: UIImage?
public var mainBtnBackgroundColor: UIColor
public var mainBtnTintColor: UIColor
public var mainBtnTitle: String

public var showCloseBtn: Bool
public var closeBtnTint: UIColor
public var alertTitle: String
public var alertDescription: String
public var alertDestructiveBtnTitle: String
public var alertMainBtnTitle: String

Output:

As output, you will receive a Response enum. Which lets you understand what action was chosen by the user.

public enum Response {
	case mainAction
	case close
}

Config

Config has predefined static variables:

livenessSuccess

livenessFail

congrats

AcceptTerms

Do not use this step it is only for our internal demo project. Maybe we will share it with everybody later

DocumentSelection

If you want to allow a user to select a type of the document before verification process, you can use this step.

Input:

  • documents - instances which implement DocumentTypeViewProtocol

public protocol DocumentTypeViewProtocol {
    var image: UIImage? { get }
    var name: String { get }
}
  • config

public var title: String
public var mainBtnBackgroundColor: UIColor
public var mainBtnTintColor: UIColor
public var mainBtnTitle: String
public var documentTypeViewTintColor: UIColor

Output:

As output, you will receive an Int value, this gives you an index of the selected type

DocumentIntro

You can use this step as a step before some document scan.

Input

  • config

public var title: String
public var description: String
public var image: UIImage?
public var mainBtnBackgroundColor: UIColor
public var mainBtnTintColor: UIColor
public var mainBtnTitle: String
public var galleryBtnBackgroundColor: UIColor
public var galleryBtnTintColor: UIColor
public var galleryBtnTitle: String
public var isGalleryBtnHidden: Bool

Output

As output, you will receive a StepResult enum. Which lets you understand what action was chosen by the user. This step has two action buttons - take photo and take image from gallery

enum StepResult {
	case takePhoto
	case galleryImage(UIImage)
}

Config

Config has predefined static variables:

worldwide

worldwideBack

utilityBill

travelDocument

idCard

ukrainianPassportFirst

ukrainianPassportSecond

ukrainianPassportThird

ukrainianPassportFourth

DocumentConfirm

You can use this step as a step after some document scan.

Input

  • config

public var title: String
public var docImage: UIImage?
public var mainBtnBackgroundColor: UIColor
public var mainBtnTintColor: UIColor
public var mainBtnTitle: String
public var retryBtnBackgroundColor: UIColor
public var retryBtnTintColor: UIColor
public var retryBtnTitle: String
public var isRetryBtnHidden: Bool
public var hints: [DocumentConfirmHintViewModel]?

Output

As output, you will receive a StepResult enum. Which lets you understand what action was chosen by the user. This step has two action buttons - retry and next

enum StepResult {
	case retry
	case next
}

SelfieIntro

This step is intro selfie step.

Input

  • config

public var title: String
public var description: String
public var image: UIImage?
public var mainBtnBackgroundColor: UIColor
public var mainBtnTintColor: UIColor
public var mainBtnTitle: String

SelfieWithDocConfirm

You can use this step as a step after selfie with doc photo.

Input

  • config

public var title: String
public var docImage: UIImage?
public var mainBtnBackgroundColor: UIColor
public var mainBtnTintColor: UIColor
public var mainBtnTitle: String
public var retryBtnBackgroundColor: UIColor
public var retryBtnTintColor: UIColor
public var retryBtnTitle: String
public var isRetryBtnHidden: Bool
public var hints: [DocumentConfirmHintViewModel]?

Output

As output, you will receive a StepResult enum. Which lets you understand what action was chosen by the user. This step has two action buttons - retry and next

enum StepResult {
	case retry
	case next
}

Last updated