AilaConfiguration
SDK configuration object used to configure all Aila settings.
Declaration
- Objective-C
- Swift
@interface AilaConfiguration : NSObject
@end
class AilaConfiguration : NSObject
Description
This object is used to configure the parameters available within the SDK. Create an instance, set the desired properties, and pass it to Aila_SetConfiguration(). Default values are subject to change between library versions.
Properties
multiScanMode
MultiScan enables the Aila SDK to acquire multiple objects (e.g. barcodes), returning them as a data stream as they are scanned.
Type: AilaMultiScanMode
Default: AilaMultiScanModeOff
duplicateFilter
This property only applies when AilaMultiScanMode is enabled. When on, once an object has been captured it will not return again until timeout or Aila_ResetScan() is called.
Type: AilaDuplicateFilter
Default: AilaDuplicateFilterOn
gs1ParsingMode
Enables or disables parsing of GS1-formatted barcodes.
Type: AilaGS1ParsingMode
Default: AilaGS1ParsingModeOff
mrzMode
Enables or disables support for scanning Machine Readable Zones (MRZ) on passports and IDs.
Type: AilaMRZMode
Default: AilaMRZModeOff
mrzDetectionMode
Enables or disables MRZ detection notifications for partial MRZ pieces.
Type: AilaMRZDetectionMode
Default: AilaMRZDetectionModeOff
upceExpansionMode
Expands UPC-E barcodes to their equivalent UPC-A format if enabled.
Type: AilaUPCEExpansionMode
Default: AilaUPCEExpansionModeOff
eanSupplementalMode
Enables detection and handling of EAN supplemental codes (e.g., 2-digit or 5-digit add-ons).
Type: AilaEANSupplementalMode
Default: AilaEANSupplementalModeOff
dlParsingMode
Enables or disables parsing of PDF417 driver's licenses (AAMVA-compliant).
Type: AilaDLParsingMode
Default: AilaDLParsingModeOff
beepMode
Controls whether an audible beep is played when a scan is successful. Ignored when multiScanMode is enabled.
Type: AilaBeepMode
Default: AilaBeepModeOn
focusMode
Specifies the focus mode used by the scanner.
Type: AilaFocusMode
Default: AilaFocusStandardMode
id1CardDetectionMode
Kiosks fitted with an ID Tray can automatically detect the presence of an ID-1 sized card.
Type: AilaID1CardDetectionMode
Default: AilaID1CardDetectionModeOff
imageCaptureDebugMode
Allows the return of the image regardless of whether ImageCapture reaches a timeout condition.
Type: AilaImageCaptureDebugMode
Default: AilaImageCaptureDebugModeOff
enabledCameraPosition
Allows for the ability to scan from front or back camera.
Type: AilaEnabledCameraPosition
Default: AilaEnabledCameraPositionBack
rsm
Remote status monitoring allows Aila to monitor system health, performance, and provide enhanced customer support.
Type: AilaRSM
Default: AilaRSMOn
cloudLicensing
Cloud licensing enables management of licensed features via the developer portal.
Type: AilaCloudLicensing
Default: AilaCloudLicensingOff
powerManagementMode
Power Management has two modes: Efficiency Mode and Safe Mode.
Type: AilaPowerManagementMode
Default: AilaPowerManagementModeOn
scanCallback
Upon each successful scan, scanCallback will be invoked in an arbitrary non-main thread. No further scans may occur until scanCallback returns.
Type: AilaScanCallback (block/closure)
Default: nil
debugLevel
Specifies the debug logging level for SDK output.
Type: AilaDebugLevel
Default: AilaDebugLevelWarn
Methods
setCode:enabled:
Disable or enable code types individually.
- Objective-C
- Swift
- (void)setCode:(AilaCodeType)codeType enabled:(BOOL)enableCode;
func setCode(_ codeType: AilaCodeType, enabled enableCode: Bool)
Parameters:
codeType- The code type to configureenableCode-YES/trueto enable,NO/falseto disable
To disable all barcode symbologies, use AilaCodeTypeNone.
Usage Example
- Objective-C
- Swift
AilaConfiguration *config = [[AilaConfiguration alloc] init];
// Set modes
config.multiScanMode = AilaMultiScanModeOn;
config.beepMode = AilaBeepModeOff;
config.mrzMode = AilaMRZModeOn;
config.dlParsingMode = AilaDLParsingModeOn;
// Enable specific code types
[config setCode:AilaCodeTypeQR enabled:YES];
[config setCode:AilaCodeType128 enabled:YES];
[config setCode:AilaCodeTypePDF417 enabled:YES];
// Set scan callback
config.scanCallback = ^(NSArray<AilaScanObject *> *results) {
for (AilaScanObject *scan in results) {
NSLog(@"Type: %@, Data: %@", [scan typeDescription], scan.data);
}
};
// Set debug level
config.debugLevel = AilaDebugLevelInfo;
// Apply configuration
Aila_SetConfiguration(config);
let config = AilaConfiguration()
// Set modes
config.multiScanMode = .on
config.beepMode = .off
config.mrzMode = .on
config.dlParsingMode = .on
// Enable specific code types
config.setCode(.QR, enabled: true)
config.setCode(._128, enabled: true)
config.setCode(.PDF417, enabled: true)
// Set scan callback
config.scanCallback = { results in
for scan in results {
print("Type: \(scan.typeDescription()), Data: \(scan.data)")
}
}
// Set debug level
config.debugLevel = .info
// Apply configuration
Aila_SetConfiguration(config)
See Also
- Aila_SetConfiguration - Apply configuration
- Constants - All configuration enums