Integration Documentation(CustomView Mode)

This document explains how to use the core UI component AAIIQACameraWrapperView

Overview

AAIIQACameraWrapperView is a UIView component that provides essential scanning and photo capture capabilities. You can directly integrate it into your own page, giving you complete control over UI layout and interaction.

Usage Steps

  1. Before using, please refer to the integration documentation to incorporate the SDK into your project, as this component is provided by the "AAIGlobalIQASDK" module. Note you don't need to integrate the AAIGlobalIQAUI module, as AAIIQACameraWrapperView is a standalone component that does not depend on the default UI module, which can reduce the package size.

  2. Import the AAIGlobalIQASDK module where you need to use AAIIQACameraWrapperView.

  3. Init SDK, then set the license.

  4. Add AAIIQACameraWrapperView to your view hierarchy, and configure it as needed.

  5. Use the startScanMode(with:delegate:) method to begin scanning mode, or the startPhotoMode(with:delegate:) method to start photo capture mode.

  6. Implement the AAIIQACameraWrapperViewAuthDelegate protocol and AAIIQACameraWrapperViewScanModeDelegate or AAIIQACameraWrapperViewPhotoModeDelegate protocol to handle scan or photo capture callback events.

Example

Below is a simple example demonstrating how to use AAIIQACameraWrapperView for scanning and taking photos. You can find similar sample code in the demo project(CameraViewDemo1/MyCameraDemo1ViewController.swift), which you may also reference for implementation.

Image Warn Code

During scanning mode, the iqa(onScanWarnCodeChanged:) delegate method will be called to provide real-time feedback on the quality of the scanned image. The following table lists the possible warning codes and their meanings:

Warn Code (Swift)Warn Code (Objective-C)MeaningSuggested prompts
.noCardAAIIQAWarnCodeNoCardNo card detectedNo document is detected
.tooSmallCardAAIIQAWarnCodeTooSmallCardCard area is too smallDocument is too small
.edgeCrossAAIIQAWarnCodeEdgeCrossCard edges are incompleteThe document is incomplete\nplease make sure the document in the center with the edges aligned
.cardPoorQualityAAIIQAWarnCodeCardPoorQualityLow card quality: Dim/Blurred/OverexposedDocument is too dim/blurred/overexposed
.hasOccludedAAIIQAWarnCodeHasOccludedCard area is occludedPlease keep your ID card unobstructed
.goodAAIIQAWarnCodeGoodCard quality is acceptablePlease hold the phone steady
.unspecifiedAAIIQAWarnCodeUnspecified--

Error Code

See Error Codes Table for details about error codes.