ALCoreController Class Reference

Inherits from NSObject
Declared in ALCoreController.h

Overview

The Anyline Controller is the small but powerful interface to our image processing / text recognition. Loaded with different Configurations files it can execute totally different tasks.

  asyncSDK

With this boolean you can control if the SDK runs on an async queue or if you want to run it on your current thread.

@property (nonatomic, assign) BOOL asyncSDK

Declared In

ALCoreController.h

  running

@property (nonatomic, assign, getter=isRunning) BOOL running

  singleRun

@property (nonatomic, assign, getter=isSingleRun) BOOL singleRun

  delegate

The delegate property. You must set the delegate if you want to get any results out of the Anyline SDK.

@property (nonatomic, weak) id<ALCoreControllerDelegate> _Nullable delegate

Declared In

ALCoreController.h

– initWithLicenseKey:

Initializes a new AnylineController with a license key. In order to correctly run Anyline you will have to set the AnylineController delegate and load an appropriate configuration.

- (instancetype _Nullable)initWithLicenseKey:(NSString *_Nonnull)licenseKey

Parameters

licenseKey

The license key you purchased for Anyline.

Return Value

A new instance of AnylineController.

Declared In

ALCoreController.h

– initWithLicenseKey:delegate:

Initializes a new AnylineController with a license key and delegate. In order to correctly run Anyline you will have to load an appropriate configuration.

- (instancetype _Nullable)initWithLicenseKey:(NSString *_Nonnull)licenseKey delegate:(id<ALCoreControllerDelegate> _Nullable)delegate

Parameters

licenseKey

The license key you purchased for Anyline.

delegate

The delegate where for the Anyline callbacks.

Return Value

A new instance of AnylineController.

Declared In

ALCoreController.h

– loadScript:bundlePath:error:

This method loads the Anyline SDK with an configuration string.

- (BOOL)loadScript:(NSString *_Nonnull)script bundlePath:(NSString *_Nonnull)bundlePath error:(NSError *_Nullable *_Nullable)error

Parameters

script

The string which represents the configuration.

bundlePath

The bundlePath where the additional ressources are located.

finished

Inidicating if setup is finished with an error object when setup failed.

Declared In

ALCoreController.h

– loadScript:scriptName:bundlePath:error:

This method loads the Anyline SDK with an configuration string.

- (BOOL)loadScript:(NSString *_Nonnull)script scriptName:(NSString *_Nonnull)scriptName bundlePath:(NSString *_Nonnull)bundlePath error:(NSError *_Nullable *_Nullable)error

Parameters

script

The string which represents the configuration.

scriptName

The filename of the script.

bundlePath

The bundlePath where the additional ressources are located.

finished

Inidicating if setup is finished with an error object when setup failed.

Declared In

ALCoreController.h

– loadCmdFile:bundlePath:error:

This method loads the Anyline SDK with an configuration file which is located at the bundlePath. The configuration must ether be an .alc unencrypted file or an .ale encrypted file.

- (BOOL)loadCmdFile:(NSString *_Nonnull)cmdFileName bundlePath:(NSString *_Nonnull)bundlePath error:(NSError *_Nullable *_Nullable)error

Parameters

cmdFileName

Configuration filename. Ether .alc or .ale. Located at the bundlePath

bundlePath

The bundlePath where the configuration and the additional ressources are located.

finished

Inidicating if setup is finished with an error object when setup failed.

Declared In

ALCoreController.h

– startWithImageProvider:error:

Starts a continious image processing workflow where the images are provided from the image provider interface. Should for example be called in the viewDidAppear:

- (BOOL)startWithImageProvider:(id<ALImageProvider> _Nonnull)imageProvider error:(NSError *_Nullable *_Nullable)error

Parameters

imageProvider

The image provider which is responsible for providing the frames for the computation.

error

The error if the processing can not be started.

Return Value

Boolean indicating the success / failure of the start process.

Declared In

ALCoreController.h

– startWithImageProvider:startVariables:error:

Starts a continious image processing workflow where the images are provided from the image provider interface. Should for example be called in the viewDidAppear:

- (BOOL)startWithImageProvider:(id<ALImageProvider> _Nonnull)imageProvider startVariables:(NSDictionary *_Nullable)variables error:(NSError *_Nullable *_Nullable)error

Parameters

imageProvider

The image provider which is responsible for providing the frames for the computation.

error

The error if the processing can not be started.

startVariables

Variables which will be added to the process and can be referenced in the Anyline Command File.

Return Value

Boolean indicating the success / failure of the start process.

Declared In

ALCoreController.h

– stopAndReturnError:

Stops a previously started image processing workflow. Should be called ex. in viewDidDisappear: or viewWillDisappear:

- (BOOL)stopAndReturnError:(NSError *_Nullable *_Nullable)error

Parameters

error

The error if processing workflow could not be stopped

Return Value

Boolean indicating the success / failure of the stop.

Declared In

ALCoreController.h

– processImage:error:

Starts a single image run with an UIImage.

- (BOOL)processImage:(UIImage *_Nonnull)image error:(NSError *_Nullable *_Nullable)error

Parameters

image

The image or video frame which should be processed. This image is referenced as $image in the .alc configuation file.

error

If an error occured while trying to start processing, it is passed here.

Return Value

BOOL indicating if the processing could be started.

Declared In

ALCoreController.h

– processImage:startVariables:error:

Starts a single image run with an UIImage and a start variable dictionary.

- (BOOL)processImage:(UIImage *_Nonnull)image startVariables:(NSDictionary *_Nullable)variables error:(NSError *_Nullable *_Nullable)error

Parameters

image

The image or video frame which should be processed. This image is referenced as $image in the .alc configuation file.

variables

Variables which will be added for this single process. They can be used and controlled in the .alc files. @see ALConfig for global config variables.

error

If an error occured while trying to start processing, it is passed here.

Return Value

BOOL indicating if the processing could be started.

Declared In

ALCoreController.h

– processALImage:error:

Starts a single image run with an ALImage.

- (BOOL)processALImage:(ALImage *_Nonnull)alImage error:(NSError *_Nullable *_Nullable)error

Parameters

alImage

The image or video frame which should be processed. This image is referenced as $image in the .alc configuation file.

error

If an error occured while trying to start processing, it is passed here.

Return Value

BOOL indicating if the processing could be started.

Declared In

ALCoreController.h

– processALImage:startVariables:error:

Starts a single image run with an ALImage and a start variable dictionary.

- (BOOL)processALImage:(ALImage *_Nonnull)alImage startVariables:(NSDictionary *_Nullable)variables error:(NSError *_Nullable *_Nullable)error

Parameters

alImage

The image or video frame which should be processed. This image is referenced as $image in the .alc configuation file.

variables

Variables which will be added for this single process. They can be used and controlled in the .alc files. @see ALConfig for global config variables.

error

If an error occured while trying to start processing, it is passed here.

Return Value

BOOL indicating if the processing could be started.

Declared In

ALCoreController.h

– setParameter:forKey:

Sets a parameter with a key in the Interpreter.

- (void)setParameter:(id _Nonnull)parameter forKey:(NSString *_Nonnull)key

Parameters

parameter

Parameter to set.

key

The key for the parameter.

Declared In

ALCoreController.h

+ versionNumber

The Version number of the current Anyline framework.

+ (NSString *_Nonnull)versionNumber

Return Value

The Version number as String

Discussion

Warning: The Anyline SDK must be added to the Copy Bundle Ressources to make this method work correctly.

Declared In

ALCoreController.h

+ buildNumber

The Build number of the current Anyline framework.

+ (NSString *_Nonnull)buildNumber

Return Value

The Build number as String

Discussion

Warning: The Anyline SDK must be added to the Copy Bundle Ressources to make this method work correctly.

Declared In

ALCoreController.h

+ licenseExpirationDateForLicense:error:

Expiration Date of a License Key.

+ (NSString *_Nullable)licenseExpirationDateForLicense:(NSString *_Nullable)licenseKey error:(NSError *_Nullable *_Nullable)error

Parameters

licenseKey

A NSString containing the licenseKey

error

will contain an exception if the validation of the licenseKey fails

Return Value

license expiration Date as NSString

Declared In

ALCoreController.h

+ frameworkBundle

+ (NSBundle *_Nonnull)frameworkBundle

– enableReporting:

Reporting ON Switch, off by default

- (void)enableReporting:(BOOL)enable

Parameters

enable

if YES, anyline will report for QA failed scan tries. Use reportImageForLog in ALC file, and use the reportScanResultState: for reporting

Declared In

ALCoreController.h

– reportIncludeValues:

- (void)reportIncludeValues:(NSString *_Nonnull)values

– runStatistics

- (NSArray *_Nonnull)runStatistics