Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for iOS

SBSCode Class Reference

Inherits NSObject.

Properties

NSString * symbologyString
 
NSString * symbologyName
 
SBSSymbology symbology
 
NSString * data
 
NSData * rawData
 
BOOL isRecognized
 
SBSQuadrilateral location
 
BOOL isGs1DataCarrier
 
int symbolCount
 
SBSCompositeFlag compositeFlag
 

Detailed Description

Represents a recognized/localized barcode/2D code.

The SBSCode class represents a barcode, or 2D code that has been localized or recognized by the barcode recognition engine.

Property Documentation

- (NSString*) symbologyString
readnonatomicassign

The symbology of the barcode as a string, including GS1 data carrier states.

This property is set to one of the following values:

"EAN8", "EAN13", "UPC12", "UPCE", "CODE128", "GS1-128", "CODE39", "CODE93", "ITF", "MSI", "CODABAR", "GS1-DATABAR", "GS1-DATABAR-EXPANDED", "QR", "GS1-QR", "DATAMATRIX", "GS1-DATAMATRIX", "PDF417", "TWO-DIGIT-ADD-ON", "FIVE-DIGIT-ADD-ON", "AZTEC", "MAXICODE", "GS1-DATABAR-LIMITED", "CODE11", "UNKNOWN".

Codes for which SBSCode::isRecognized is NO, "UNKNOWN" is returned.

- (NSString*) symbologyName
readnonatomicassign

The symbology name of the barcode as a string.

Returns
Lower-case symbology name. Codes for which SBSCode::isRecognized is NO, "unknown" is returned. In contrast to SBSCode::symbologyString, the returned symbology does not contain any information on whether the code is a GS1 data carrier, use SBSCode::isGs1DataCarrier for that.
Since
4.10.0
- (SBSSymbology) symbology
readnonatomicassign

Returns the symbology of a recognized barcode.

Codes for which SBSCode::isRecognized is NO return SBSSymbologyUnknown.

- (NSString*) data
readnonatomicassign

The data contained in the barcode/2D code, e.g. the 13 digit number of a EAN-13 code.

For some types of barcodes/2D codes (for example DATAMATRIX, AZTEC, PDF417), the data string may contain non-printable characters and nul-bytes in the middle of the string. SBSCode::data may be nil in these cases. Use SBSCode::rawData if your application scans these types of codes and you are expecting binary/non- printable data.

- (NSData*) rawData
readnonatomicassign

The raw byte data contained in the barcode.

Use this method in case you are encoding binary data in barcodes\2D codes that can not be represented as UTF-8 strings. For codes that are localized but not recognized, nil is returned.

- (BOOL) isRecognized
readnonatomicassign

Whether the code was completely recognized.

This property is true for barcodes that were completely recognized and false for codes that were localized but not recognized. For codes returned by SBSScanSession::newlyRecognizedCodes and SBSScanSession::allRecognizedCodes isRecognized always returns YES, for codes returned by SBSScanSession::newlyLocalizedCodes isRecognized always returns NO.

- (SBSQuadrilateral) location
readnonatomicassign

The location of the code in the image.

The location is returned as a a polygon with 4 corners. The corners are in the coordinate system of the raw preview image. In order to be displayed they must be transformed to the coordinate system of the view. The meaning of the values of topLeft, topRight etc is such that the topLeft point corresponds to the top-left corner of the barcode regardless of how it is oriented in the image.

See also
- convertPointToPickerCoordinates: (SBSBarcodePicker)
- (BOOL) isGs1DataCarrier
readnonatomicassign

Whether the code is a GS1 data carrier.

Returns
True if the code is a GS1 data carrier, false if not. False is returned for codes that have only been localized but not recognized.
Since
4.10.2
- (int) symbolCount
readnonatomicassign

The symbol count of this barcode.

Use this value to determine the symbol count of a particular barcode, e.g. to configure the active symbol counts. For localized, but not recognized barcodes as well as 2d codes this property is set to -1.

- (SBSCompositeFlag) compositeFlag
readnonatomicassign

Flag to hint whether the barcode is part of a composite code.

For barcodes that are localized but not recognized, SBSCompositeFlagUnknown is returned.


The documentation for this class was generated from the following file: