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
Since 3.0.0MultiScan 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
Since 3.0.0This 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
Since 3.0.0Enables or disables parsing of GS1-formatted barcodes.
Type: AilaGS1ParsingMode
Default: AilaGS1ParsingModeOff
mrzMode
Since 3.0.0Enables or disables support for scanning Machine Readable Zones (MRZ) on passports and IDs.
Type: AilaMRZMode
Default: AilaMRZModeOff
mrzDetectionMode
Since 3.0.0Enables or disables MRZ detection notifications for partial MRZ pieces.
Type: AilaMRZDetectionMode
Default: AilaMRZDetectionModeOff
upceExpansionMode
Since 3.0.0Expands UPC-E barcodes to their equivalent UPC-A format if enabled.
Type: AilaUPCEExpansionMode
Default: AilaUPCEExpansionModeOff
eanSupplementalMode
Since 3.0.0Enables detection and handling of EAN supplemental codes (e.g., 2-digit or 5-digit add-ons).
Type: AilaEANSupplementalMode
Default: AilaEANSupplementalModeOff
dlParsingMode
Since 3.0.0Enables or disables parsing of PDF417 driver's licenses (AAMVA-compliant).
Type: AilaDLParsingMode
Default: AilaDLParsingModeOff
beepMode
Since 3.0.0Deprecated in 3.1.0Use beepVolume instead; beepMode will be removed in April 2027.Controls whether an audible beep is played when a scan is successful. Ignored when multiScanMode is enabled.
Type: AilaBeepMode
Default: AilaBeepModeOn
beepVolume
Since 3.1.0Controls the volume of the beep played when a scan is successful. Ignored when multiScanMode is enabled. A beep triggered manually with Aila_Beep() also plays at this volume.
Type: AilaBeepVolume
Default: AilaBeepVolume3
AilaBeepVolume0 turns the beep off; AilaBeepVolume1 to AilaBeepVolume5 turn it on at increasing volumes. Volume control depends on the head unit model, which is printed on the sticker inside the head unit enclosure:
- "Head Unit for ..." - Full volume control is supported.
- "IK for ..." - Volume control isn't supported.
AilaBeepVolume0turns the beep off, andAilaBeepVolume1toAilaBeepVolume5all beep at the same fixed volume.
On older systems, volumes 1-5 always beep at the default volume.
beepVolume replaces the deprecated beepMode: AilaBeepVolume0 behaves like AilaBeepModeOff, and AilaBeepVolume1 to AilaBeepVolume5 like AilaBeepModeOn.
focusMode
Since 3.0.0Specifies the focus mode used by the scanner.
Type: AilaFocusMode
Default: AilaFocusStandardMode
id1CardDetectionMode
Since 3.0.0Kiosks fitted with an ID Tray can automatically detect the presence of an ID-1 sized card.
Type: AilaID1CardDetectionMode
Default: AilaID1CardDetectionModeOff
imageCaptureDebugMode
Since 3.0.0Allows the return of the image regardless of whether ImageCapture reaches a timeout condition.
Type: AilaImageCaptureDebugMode
Default: AilaImageCaptureDebugModeOff
enabledCameraPosition
Since 3.0.0Allows for the ability to scan from front or back camera.
Type: AilaEnabledCameraPosition
Default: AilaEnabledCameraPositionBack
rsm
Since 3.0.0Remote status monitoring allows Aila to monitor system health, performance, and provide enhanced customer support.
Type: AilaRSM
Default: AilaRSMOn
cloudLicensing
Since 3.0.0Cloud licensing enables management of licensed features via the developer portal.
Type: AilaCloudLicensing
Default: AilaCloudLicensingOn
powerManagementMode
Since 3.0.0Power Management has two modes: Efficiency Mode and Safe Mode.
Type: AilaPowerManagementMode
Default: AilaPowerManagementModeOn
scanCallback
Since 3.0.0Upon 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
Since 3.0.0Specifies the debug logging level for SDK output.
Type: AilaDebugLevel
Default: AilaDebugLevelSilent
enabledLogCategories
Since 3.1.0Limits Info, Debug and Bulk log messages to the listed categories, which reduces console noise when debugging a specific area. Error and Warn messages are never filtered by category.
Type: NSSet<NSNumber *> * of AilaLogCategory values ([AilaLogCategory]? through logCategories in Swift)
Default: nil
| Value | Behavior |
|---|---|
nil | All categories are logged |
| Empty set | No Info, Debug or Bulk messages are logged |
| Non-empty set | Only the listed categories log at Info, Debug and Bulk |
- Objective-C
- Swift
config.debugLevel = AilaDebugLevelDebug;
config.enabledLogCategories = [NSSet setWithObjects:
@(AilaLogCategoryMRZ), @(AilaLogCategoryScan), nil];
Aila_SetConfiguration(config);
config.debugLevel = .debug
config.logCategories = [.MRZ, .scan]
Aila_SetConfiguration(config)
Methods
setCode:enabled:
Since 3.0.0Disable 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(.typeQR, enabled: true)
config.setCode(.type128, enabled: true)
config.setCode(.typePDF417, 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