Skip to main content

Configuration

Capture options are set on an MSConfiguration object that you pass to initAPI. The defaults are the recommended values; change them only when your use case needs it.

Apply a configuration​

let configuration = MSConfiguration()
configuration.returnOriginalImage = true

MobbScanAPI.getInstance().initAPI(withLicense: "YOUR_LICENSE_KEY", configuration: configuration) { result, validTo in
// ...
}
MobbScanAPI.getInstance().baseURL = "YOUR_MOBBSCAN_URL"

Environment​

PropertyDescription
baseURLURL of your MobbScan environment, provided by Mobbeel. Set it right after initAPI.

MSConfiguration options​

While the camera is open, the SDK checks every frame and only accepts captures that are good enough to be processed.

PropertyTypeDefaultDescription
falsePositivebooleantrueChecks that the detected document side is the expected one.
qaControlbooleantrueEnables or disables all quality checks at once.
checkDocumentLightnessbooleantrueChecks that the document is neither too dark nor too bright.
checkDocumentPositionbooleantrueChecks that the document is inside the detection box, neither too far nor too close.
checkDocumentSparklesbooleantrueChecks there are no glares on the document.
checkDocumentBlurringbooleanfalseChecks that the document is in focus.
checkFacialLightnessbooleantrueChecks that the face is neither too dark nor too bright.
checkFacialPositionbooleantrueChecks that the face is inside the frame, neither too far nor too close.
checkFacialFocusbooleantrueChecks that the face is in focus.
checkFacialMaskbooleantrueChecks that the face is not covered by a mask.
checkFacialSunglassesbooleantrueChecks the user is not wearing sunglasses.
checkFacialNumFacesbooleantrueChecks the number of faces in the captured image.
checkFacialResolutionbooleantrueChecks the resolution of the detected face image.
returnOriginalImagebooleanfalseReturns the original image as part of the detection result.
isLightModebooleanfalseUses ambient light with the front camera during face capture.
scanFullSizeImagesbooleantrueSends the whole captured image to the backend when detecting documents, instead of just the cropped image with the document itself, which can improve detections.
isCancellationDialogEnabledbooleantrueAsks for confirmation before leaving a capture.
timeoutInSecondsnumbernullTimeout for the PDF417 detection in seconds.

Disabling quality checks lets poor captures through and lowers data-extraction and face-matching accuracy. Keep them enabled in production — every check is on by default except checkDocumentBlurring. When a user leaves a capture, the callback receives PROCESS_CANCELLED or SCANNING_PROCESS_CANCELLED.

Orientation​

The built-in document screen supports portrait and landscape. For custom screens, set the orientation with setDetectionOrientation before starting the detection.