Mobbeel for developers

Mobbeel for developers

  • MobbScan
  • MobbID
  • MobbSign
  • Clients
  • FAQ

›Customization

MobbScan iOS

  • Welcome to the MobbScan SDK
  • SDK size

Configure SDK

  • Configure the iOS SDK

Migration Guides

  • Migration to 2.26.0
  • Migration to 2.19.0
  • Migration to 2.18.0
  • Migration to 2.17.0
  • Migration to 2.16.0

Getting Started

  • Initalize API
  • Scanning a document with MobbScan
  • Performing Face Matching
  • Adding a video step
  • Record a video while user scans the document
  • Getting the verification result
  • Scanning documents with NFC
  • Detect and scan MRZ
  • Detect and scan a PDF417
  • Add fields to validations in agent portal
  • Error Handling

Additional Configuration

  • MobbScan Configuration

Customization

  • Customize Detection Views
  • Customize Feedback Messages
  • Customize Unattended Process

Reference

  • Changelog

Customize Unattended Process

Overview

The unattended video process can be customized as well as the other process. This process customization also comes in two flavors: simple and full.

Customize Default Process

This is the simplest way of customize the unattended process. Just add a file named ms_theme.plist into your application project and override some or all of the followings properties:

PropertyTypeDefault ValueDescription
MSUThemeKeyLoadingBackgroundColorString#FFFFFFBackground color of the loading view (RGB)
MSUThemeKeyLoadingSpinnerColorString#FE3D6AColor of the spinner image displayed while loading (RGB)
MSUThemeKeyLoadingTextColorString#000000Message font color of loading view
MSUThemeKeyCancelButtonColorString#FFFF00Cancel button color (RGB)
MSUThemeKeyDocumentOverlayColorString#000000BF(Document Step) Color of the overlay view (RGB/RGBA)
MSUThemeKeyDocumentFrameLineWidthNumber2(Document Step) Line width of the detection box
MSUThemeKeyDocumentFrameDefaultColorString#FFFFFF(Document Step) Default color of the detection box line (RGB)
MSUThemeKeyDocumentFrameDetectingStateColorString#A5DB30(Document Step) Color of the detection box line displayed when documents are being detected
MSUThemeKeyDocumentCountdownTextSizeNumber40(Document Step) Countdown font size
MSUThemeKeyDocumentCountdownTextColorString#FFFFFF(Document Step) Countdown font text color
MSUThemeKeyDocumentTextColorString#FFFFFF(Document Step) Feedback messages font color (RGB)
MSUThemeKeyDocumentTextSizeNumber16(Document Step) Feedback messages font size
MSUThemeKeyFaceOverlayColorString#000000(Face Step) Color of the overlay view (RGB)
MSUThemeKeyFaceOverlayAlphaNumber0.75(Face Step) Transparency of the overlay view
MSUThemeKeyFaceAnimationLineColorString#FFFFFF(Face Step) Color of the shape strokes of the animations (RGB)
MSUThemeKeyFaceTextColorString#FFFFFF(Face Step) Feedback message font color
MSUThemeKeyFaceTextBackgroundColorString#00000000(Face Step) Feedback message font background color
MSUThemeKeyFaceTextShadowColorString#00000077(Face Step) Feedback message font shadow color
MSUThemeKeyFaceTextShadowOffsetArray[2,2](Face Step) Feedback message font shadow offset
MSUThemeKeyOTPBackgroundColorString#0000008C(OTP Step) Color of the overlay view (RGB/RGBA)
MSUThemeKeyOTPTextColorString#FFFFFF(OTP Step) Feedback message font color
MSUThemeKeyOTPCardTextColorString#4287F5(OTP Step) Card text color
MSUThemeKeyOTPCardBackgroundColorString#FFFFFF(OTP Step) Card background color
MSUThemeKeyOTPButtonTextColorString#FFFFFF(OTP Step) Done button text color
MSUThemeKeyOTPButtonBackgroundColorString#4287F5(OTP Step) Done button background color
MSUThemeKeyStatusBarAutoBooleantrueWhether or not the status bar style should be updated based on background color (*)
MSUThemeKeyStatusBarStyleStringlightStatus bar style (light/default). Only relevant if MSUThemeStatusBarAuto is false

(*) Dark backgrounds will display light style. Light backgrounds will display default style.

Full Customization

If you need a more extensive customization for your unattended process, you can define your own interfaces. You can also indicate an UIView to the MobbScan API so it can draw the camera flow.

This way, the camera flow that is used for document and face detection will be shown in your desired view, and you can paint your own interfaces over it, show messages, and handle the events that suit your needs.

Follow the next steps in order to have a nice, functional ViewController with an unattended process.

Start unattended process

First of all you need to start the unattended process. By doing this, MobbScan API connects with the server and gets itself configured so every operation (document or face detection) that you perform will be recorded on a video.

This is the method you need to invoke for this purpose:

Swift
ObjectiveC
MobbScanAPI.getInstance().startUnattendedVideoDetecting(for: view, withScanId: scanId, recordingVideoStartedListener: {
(result, error) in
// Start result block code
})
[[MobbScanAPI getInstance] startUnattendedVideoDetectingForView:view withScanId:scanId recordingVideoStartedListener:^(VideoUnattendedResult result, NSError *_Nullable error) {
// Start result block code
}];

The parameters of this method are:

  • view: This is an UIView object which will show the camera during unattended process. Over this view you will paint the detection interfaces you are going to use.
  • scanId: The scanId you got on startScan process.
  • recordingVideoStartedListener: This block will be invoked once the API connects with the server side and the video begins to record. At this point, the camera will be shown on the view you indicated on the first parameter. The listener provides two objects:
    • result: can be OK or ERROR. It indicates if the start process was successful or if there was a problem during the start process.
    • error: will be nil if result is OK or will provide some information if result was ERROR.

By doing this, the camera will be shown in the view you provide. Over this view, you can push the elements you desire, either before the process starts and later when you call the MobbScan detection methods.

Switch camera

The camera preview will be shown in the view you provided. By default, the back camera is initialized. However, you can switch between both cameras so you can perform some operations like facial detection in the first place.

Swift
ObjectiveC
MobbScanAPI.getInstance().switchUnattendedVideoCamera()
[[MobbScanAPI getInstance] switchUnattendedVideoCamera];

Document and face detection

Once you have the API configured for the unattended process, you can perform document and face detection using your own interfaces.

Take a look at the document customization section and the face detection section to check how to build your interface and paint the detection feedback.

Note: The detection will be done over the camera flow that is being shown in the view you provided, so you must paint your interfaces over this view. This means that you cannot change the ViewController where you are running the process. You must keep the same ViewController during the whole unattended process.

Note: When you customize the MobbScan interfaces, you will be asked to set an UIView as camera container in the MobbScan detectionTracks. You must set the view you provided in the method startUnattendedVideoDetectingForView.

Stop unattended process

Once the user has finished the detection process (document and/or face detection), you must stop the unattended process so the camera stops recording and the server side stores the video. This is also useful to check from the application side that everything was fine in the server side and that the video was successfully stored.

Swift
ObjectiveC
MobbScanAPI.getInstance().stopUnattendedVideoDetecting(_: {
(result, error) in
// Stop result block code
})
[[MobbScanAPI getInstance] stopUnattendedVideoDetecting:^(VideoUnattendedResult result, NSError *_Nullable error) {
// Stop result block code
}];

This method only has recordingVideoStopListener as a parameter. This block will be invoked once the process is disconnected from the server side, and the video stops recording.

  • result can be OK or ERROR. It indicates if the start process was successful or if there was a problem during the start process.
  • error will be nil if result is OK and will provide some information if result was ERROR.

Cancel Unattended Process

Chances are that you might need to cancel some processes for reasons as the user cancels the process or the document scanning process fails... This can be achieved by invoking cancelUnattendedVideo method. You will need to provide at least the cancellation reason and whether or not the scanning evidences will be removed from the server. Optionally you can pass in a listener to be notified when the cancellation process ends.

Swift
ObjectiveC
MobbScanAPI.getInstance().cancelUnattendedVideo(true, reason: .USER_CANCELLED, finishListener: nil)
[self.mobbScanAPI cancelUnattendedVideo:YES
reason:MSUnattendedVideoCancelReason_USER_CANCELLED]
finishListener:nil];

Possible reasons are:

  • USER_CANCELLED
  • TIMEOUT
  • DOCUMENT_NOT_CLASSIFIED
  • DOCUMENT_NOT_VALID_ERROR
  • IDENTITY_VERIFICATION_NOT_VALID
  • CONNECTION_ERROR
← Customize Feedback MessagesChangelog →
  • Overview
  • Customize Default Process
  • Full Customization
    • Start unattended process
    • Switch camera
    • Document and face detection
    • Stop unattended process
    • Cancel Unattended Process
Mobbeel for developers
Product Documentation
MobbIDMobbScanMobbSign
Connect
LinkedInFacebookX
More
FAQContact Us
Mobbeel Solutions SL
Copyright © 2025 Mobbeel Solutions SL