Aila SDK Documentation

website·Indexed 30 days ago

https://aila-docs.dev.ailadev.com

Developer documentation for the Aila SDK, providing capabilities for data capture, ID-1 card imaging, and barcode scanning. Includes API references and integration guides for React Native, iOS, and Cordova, covering features such as MRZ detection, kiosk illumination control, and cloud licensing.

Tokens
39.1K
Snippets
202
Records
310
Agent score
49%

What's inside Aila

  1. Overview of Aila SDK capabilities

    The Aila SDK provides mobile device capabilities for data capture and device management. Key functionalities include:

    • Barcode & MRZ Scanning: Image-based scanning using the native device camera and processor for standard barcodes and Machine Readable Zones (MRZ) from travel documents.
    • ID-1 Card Imaging: Capture of credit card-sized documents (e.g., driver's licenses, health insurance cards), which can be enhanced when using the ID Tray accessory.
    • Device Management: Remote Status Monitoring (RSM) for tracking device health and performance.
    • Multi-Scan Mode: Ability to capture multiple barcodes within a single session.

    The SDK can be used in two primary modes:

    1. Hardware-Integrated: Paired with the Aila Interactive Kiosk for enhanced aiming, scan field illumination, optics, and integrated power/data hubs.
    2. SoftScan: Used without dedicated Aila hardware (requires a specific licensing plan).
  2. Overview of Aila SDK capabilities for iOS and iPadOS

    The Aila SDK provides a suite of capabilities for Apple iOS and iPadOS devices focused on data capture and device management. It supports image-based barcode scanning using the native device camera and processor, eliminating the need for external peripherals. When used with the Aila Interactive Kiosk, it gains enhanced aiming, scan field illumination, and integrated power/data hub support. For ID-1 card imaging (e.g., driver licenses), the SDK requires the ID Tray accessory. The SDK can also be used without Aila hardware via the SoftScan product (licensing required).
  3. Overview of Aila SDK capabilities

    The Aila SDK provides mobile device capabilities for data capture and device management. Key functionalities include:

    • Barcode & MRZ Scanning: Image-based scanning using the native device camera and processor. MRZ scanning specifically targets travel documents.
    • ID-1 Card Imaging: Capturing images of credit card-sized documents (e.g., driver's licenses, health insurance cards). This feature requires the ID Tray accessory when used with a kiosk.
    • Remote Status Monitoring (RSM): Tracking device health and performance.
    • Multi-Scan Mode: Ability to capture multiple barcodes within a single session.

    Deployment Options:

    1. With Aila Hardware: When paired with the Interactive Kiosk, the SDK leverages dedicated aiming, scan field illumination, optics, and an integrated data/power hub.
    2. Standalone (SoftScan): The SDK can be used without dedicated Aila hardware via the SoftScan product (requires a specific licensing plan).
  4. Handle barcode scan events with AilaSDK.onScan

    The AilaSDK.onScan method allows developers to subscribe to events triggered when a barcode is successfully scanned. The event callback provides details about the barcode type and the scanned text. To stop the scanning process, call AilaSDK.stopScanning().
    const subscription = AilaSDK.onScan((event) => {
      console.log('Barcode Type:', event.scanTypeHumanReadable);
      console.log('Data:', event.scanText);
    
      // Handle the scan
      processScan(event.scanText);
    });
    
    // Cleanup
    return () => {
      // Stop scanning when done
      AilaSDK.stopScanning();
    };
  5. Configure Aila SDK architecture support

    The Aila SDK supports the following hardware architectures:

    iOS:

    • Real Devices: armv7 and arm64
    • iOS Simulator: i386 and x86_64 (Note: Scanning will not function in the simulator as it lacks camera access).

    Android:

    • arm64-v8a (64-bit ARM)
    • armeabi-v7a (32-bit ARM)
    • x86 (Intel 32-bit emulator)
    • x86_64 (Intel 64-bit emulator)
  6. Verify Aila SDK platform and architecture requirements

    The Aila framework requires iOS/iPadOS 16.0 or greater. It supports the following architectures:

    • Real Devices: armv7 and arm64
    • iOS Simulator: i386 and x86_64 (Note: Scanning functions will not work in the simulator as it lacks camera access).
  7. Use AilaCaptureView for camera feed and MRZ scanning

    AilaCaptureView is a UIView subclass that provides a user interface including the camera feed and guidance overlays to assist users with MRZ scanning. It automatically manages the camera preview layer.
    #import <Aila/Aila.h>
    
    // Initialize and add to view hierarchy
    AilaCaptureView *captureView = [[AilaCaptureView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:captureView];
  8. Verify Aila SDK platform and architecture requirements

    The Aila SDK requires iOS/iPadOS 16.0 or greater. It supports the following architectures:

    • Real Devices: armv7 and arm64
    • iOS Simulator: i386 and x86_64 (Note: Scanning and function calls will not work in the simulator due to lack of camera access).
  9. Understand Aila SDK Licensing (v3.3+)

    Starting with SDK 3.3, licensing is handled by the SDK itself via configuration profiles. Cloud licensing is enabled by default, meaning the SDK automatically retrieves enabled features, expiration dates, and registered bundle IDs from Aila's servers. This removes the need for custom SDK builds or app redeployments when features are added or contracts are extended. For apps that must operate without connectivity, a manual Configuration Key can be retrieved from the portal and read at startup.
  10. Use AilaMRZScanObject to handle MRZ scan results

    The AilaMRZScanObject is returned within the scanCallback after a successful MRZ scan. It extends AilaScanObject and provides both parsed and raw data from the document's Machine Readable Zone.

    Important Validation Note: The first line of an MRZ is more prone to character recognition errors because it lacks a checksum. For backend validation, it is recommended to rely primarily on fields with checksums (e.g., passport number, date of birth, date of expiry) and use name fields only as secondary validation.

    @interface AilaMRZScanObject : AilaScanObject
    @property (nonatomic) AilaCodeType type;
    @property (nonatomic) NSString *data;
    @property (nonatomic) NSString *rawData;
    @end
  11. Use AilaDLScanObject to process driver's license scans

    The AilaDLScanObject represents a scanned driver's license barcode. It is returned within the scanCallback when dlParsingMode is enabled. This object extends AilaScanObject and provides access to both the parsed driver's license fields (as a JSON string) and the original unparsed PDF417 barcode string.