Andrew WJ Andrew WJ - 10 months ago 40
iOS Question

How to enable SoftScan to read Data Matrix codes in Socket Mobile ScanApi

This is my first question on StackOverflow, so please forgive me if I have not laid out my question correctly!

I am writing an iOS app in Objective-C (Which is derived from the SingleEntry example provided by Socket Mobile on GitHub) using the Scan Api by Socket Mobile, but I am having an issue setting the symbology of the SoftScan feature to read Data Matrix codes. The error returned is -15L, which from the documentation translates to ESKT_NOTSUPPORTED. I am using this from the ScanApi Helper to set the symbology, where deviceInfo is a DeviceInfo object:

[ScanApi postSetSymbologyInfo:deviceInfo SymbologyId:kSktScanSymbologyDataMatrix Status:TRUE Target:self Response:@selector(onSetSymbology:)];

The onSetSymbology method (this returns the error -15L):

SKTRESULT result=[[scanObj Msg]Result];
// display an error message saying a symbology cannot be set
NSLog(@"Symbology can not be set, error %ld", result);


I have looked around the documentation and the internet extensively and cannot find any information related to this issue.

So my question is:

  • Can Data Matrix codes be scanned/recognised by the SoftScan?

  • If so, how do you enable it?

Thanks in advance!

Answer Source

After exchanging some emails with the developers at Socket Mobile, they have kindly added support for Data Matrix barcodes in the latest version of their Scan API SDK (10.3.83).