Capture-only SDK Mode
Capture-only SDK Mode
Capture-only mode should be used in case you would just like to fetch captured ID and Selfie images, without doing any validations such as ID validation, Face recognition and Liveness detection.
Supported modules in this mode are: ID Scan, Selfie Scan, Docment Scan, Video Selfie.
All the processing inside these modules is being done locally.
1. Initialize IncdOnboarding SDK
Add the following line of code to your AppDelegate
class:
IncdOnboardingManager.shared.initIncdOnboarding()
Optionally disable logs, by providing false
for loggingEnabled
parameter.
2. Enable Capture-only mode
IncdOnboardingManager.shared.sdkMode = .captureOnly
3. Start capturing data
ID Scan
To start the front ID Scan, use following function:
IncdOnboardingManager.shared.presentingViewController = self
let flowConfig = IncdOnboardingFlowConfiguration()
flowConfig.addIdScan(idType: .id, scanStep: .front)
IncdOnboardingManager.shared.startOnboardingSection(flowConfig: flowConfig, sectionTag: "idFront", delegate: self)
Result will be returned via delegate method:
func onIdFrontCompleted(_ result: IdScanResult)
IdScanResult
will contain captured image and other data.
Note:
Adding ID Scan without specifying the specific side to be scanned will result in adding both front and back side.
In the Capture-only mode the ID Process module will not be added (otherwise in the Normal mode it would be added as well).
Selfie Scan
To start the Selfie Scan, use following function:
let flowConfig = IncdOnboardingFlowConfiguration()
flowConfig.addSelfieScan()
IncdOnboardingManager.shared.startOnboardingSection(flowConfig: flowConfig, sectionTag: "selfie", delegate: self)
The result will be returned via delegate method:
func onSelfieScanCompleted(_ result: SelfieScanResult)
SelfieScanResult
will contain captured selfie image.
Document Scan
To start the Document Scan, use following function:
let flowConfig = IncdOnboardingFlowConfiguration()
flowConfig.addDocumentScan(showTutorials: true, showDocumentProviderOptions: true, documentType: .addressStatement)
IncdOnboardingManager.shared.startOnboardingSection(flowConfig: flowConfig, sectionTag: "document",delegate: self)
The result will be returned via delegate method:
func onDocumentScanCompleted(_ result: DocumentScanResult)
DocumentScanResult
will contain captured document info.
Video Selfie
To start the Document Scan, use following function:
let flowConfig = IncdOnboardingFlowConfiguration()
let videoSelfieConfiguration = VideoSelfieConfiguration()
videoSelfieConfiguration.tutorials(enabled: true)
videoSelfieConfiguration.selfieScan(performLivenessCheck: false, mode: .faceMatch)
videoSelfieConfiguration.idScan(enabled: true, validateId: false)
videoSelfieConfiguration.documentScan(enabled: true)
videoSelfieConfiguration.minVideoLengthRequired = false
videoSelfieConfiguration.setLogo(UIImage(named: "LogoName"))
videoSelfieConfiguration.voiceConsent(enabled: true,
questionsCount: 3,
randomQuestions: ["What State do you live in?": "California",
"Which is your date of birth?": "First of October Nineteen hundred Ninety-Two",
"What State were you born in?": "Mexico"],
consent: "I accept the terms.")
flowConfig.addVideoSelfie(videoSelfieConfiguration: videoSelfieConfiguration)
IncdOnboardingManager.shared.startOnboardingSection(flowConfig: flowConfig, sectionTag: "videoSelfie", delegate: self)
The result will be returned via delegate method:
func onVideoSelfieCompleted(_ result: VideoSelfieResult)
VideoSelfieResult
will contain all the data gathered in the Video Selfie step.
Updated 7 months ago