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
- Swift
- Objective-C
let configuration = MSConfiguration()
configuration.returnOriginalImage = true
MobbScanAPI.getInstance().initAPI(withLicense: "YOUR_LICENSE_KEY", configuration: configuration) { result, validTo in
// ...
}
MobbScanAPI.getInstance().baseURL = "YOUR_MOBBSCAN_URL"
MSConfiguration *configuration = [MSConfiguration new];
configuration.returnOriginalImage = YES;
[[MobbScanAPI getInstance] initAPIWithLicense:@"YOUR_LICENSE_KEY"
configuration:configuration
result:^(MobbScanLicenseResult result, NSDate *validTo) {
// ...
}];
[MobbScanAPI getInstance].baseURL = @"YOUR_MOBBSCAN_URL";
Environment
| Property | Description |
|---|---|
baseURL | URL 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.
| Property | Type | Default | Description |
|---|---|---|---|
falsePositive | boolean | true | Checks that the detected document side is the expected one. |
qaControl | boolean | true | Enables or disables all quality checks at once. |
checkDocumentLightness | boolean | true | Checks that the document is neither too dark nor too bright. |
checkDocumentPosition | boolean | true | Checks that the document is inside the detection box, neither too far nor too close. |
checkDocumentSparkles | boolean | true | Checks there are no glares on the document. |
checkDocumentBlurring | boolean | false | Checks that the document is in focus. |
checkFacialLightness | boolean | true | Checks that the face is neither too dark nor too bright. |
checkFacialPosition | boolean | true | Checks that the face is inside the frame, neither too far nor too close. |
checkFacialFocus | boolean | true | Checks that the face is in focus. |
checkFacialMask | boolean | true | Checks that the face is not covered by a mask. |
checkFacialSunglasses | boolean | true | Checks the user is not wearing sunglasses. |
checkFacialNumFaces | boolean | true | Checks the number of faces in the captured image. |
checkFacialResolution | boolean | true | Checks the resolution of the detected face image. |
returnOriginalImage | boolean | false | Returns the original image as part of the detection result. |
isLightMode | boolean | false | Uses ambient light with the front camera during face capture. |
scanFullSizeImages | boolean | true | Sends the whole captured image to the backend when detecting documents, instead of just the cropped image with the document itself, which can improve detections. |
isCancellationDialogEnabled | boolean | true | Asks for confirmation before leaving a capture. |
timeoutInSeconds | number | null | Timeout 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.