Skip to main content

Customization

We currently support functional customization in the cases listed below, with more to be added later. Visual/branding customization will not be supported.

Localization

Localization of messages and errors is supported using a String Catalog. The comprehensive list of localised keys is provided below:

KeyEnglish (en)Comment
document_auto_captureAuto-capture - ONToggle label for auto-capture feature
document_auto_capture_infoOnce the picture is clear, we’ll automatically take a photo.Help modal auto-capture info
document_auto_capture_offAuto-capture - OFFToggle label for auto-capture feature
document_auto_capture_tipStill struggling to take a photo, turn off Auto captureHelp modal auto-capture tip
document_avoid_glareMove your document away from direct light sourcesInstruction to avoid glare when scanning document
document_blurryDocument is unclear and blurryError message when document image is not clear
document_cancelCancelCancel confirmation button
document_cancel_confirmationAre you sure you want to end your identity check?Confirmation message for user when cancelling the scan
document_cancel_confirmedUser cancelled the scanConfirmation message that the user cancelled the scan
document_continueContinueContinue button
document_endEndEnd confirmation button
document_error_component_cameraCameraIndicates the error was in the camera component
document_error_component_otherOtherIndicates the error was in the other component
document_error_component_smart_captureSmartCaptureIndicates the error was in the Smart Capture error component
document_fill_frameFill the entire frame with your documentHelp modal fill frame instruction
document_fill_frame_instructionFill your document fully within the frameInstruction to position document to fill the scanning area
document_glareLight reflection visible on documentError message when there's glare on the document
document_help_titleHow to take a photo of your identity documentHelp modal title
document_hold_phoneHold your phone steadyHelp modal hold phone instruction
document_hold_steadyHold your document and device steadyInstruction to keep device still while scanning
document_hold_stillHold stillInstruction to hold still while the document is confirmed
document_lightingUse a well lit area but avoid any strong overhead lightingHelp modal lighting instruction
document_not_detectedDocument not detectedInstruction to highlight that we don't see a document
document_photo_capturedPhoto capturedSuccess message when document photo is taken
document_place_backPlace your document BACK SIDE up on a flat surface and:Help modal subtitle
document_place_photoPlace your document PHOTO SIDE up on a flat surface and:Help modal subtitle
document_scanning_front_sidePosition the PHOTO PAGE of your document within the frame belowInstruction for user to place the photo page of the document in the scanning area
document_scanning_back_sidePosition the BACK of your document within the frame belowInstruction for user to place the back of the document in the scanning area
document_too_smallDocument does not fill the frameError message when document is too small in frame

How to Integrate

  1. Add a string catalog to your project.
  2. Include the keys listed above.
    1. Customise the message.
    2. Add additional languages.
      1. Introduce the translated copy for each key.
  3. Add an additional string catalog named InfoPlist.xcstrings to your project to localize the Info.plist file of your project.
    1. Add a key named NSCameraUsageDescription to customize the camera permission request message.

On-Capture Shutter Effect

An on-capture shutter effect is supported, providing visual, haptic, and audio feedback the moment a document is captured. This flashes the screen black, triggers haptic feedback, and plays a sound bite. The configurable options are listed below:

EffectDefault SettingDescription
Screen FlashTrueThe screen will flash black once when a document is captured.
Haptic FeedbackFalseThe user will feel a sense of touch known as haptic feedback when a document is captured.
SoundFalseThe default iOS sound bite will be played when a document is captured.

How to Integrate

This feature can be customised during the initial configuration of DocumentSDK, using the configureShutter method within DocumentScannerConfig. Below is an example:

struct ContentView: View {
@StateObject var documentSDK: DocumentSDK

init() {
var config = DocumentScannerConfig(autoCaptureToggleConfig: .showDelayed(), documentSide: .front)
config.configureShutter(screenFlash: true, hapticFeedback: true, sound: true)
_documentSDK = StateObject(wrappedValue: DocumentSDK(documentScannerConfig: config))
}

...

}