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

SBSBarcodeGenerator Class Reference

Inherits NSObject.

Instance Methods

(nullable UIImage *) - generateFromString:error:
 
(nullable UIImage *) - generateFromData:error:
 
(nullable UIImage *) - generateFromData:encodings:error:
 
(BOOL) - setOptions:error:
 

Detailed Description

A barcode generator.

Enumeration of different error types related to the.

Since
5.9.0

Method Documentation

◆ generateFromString:error:

- (nullable UIImage *) generateFromString: (nullable NSString *)  string
error: (NSError *_Nullable *_Nullable)  outError 

Generates a UIImage instance holding the encoded data.

Parameters
stringthe string to be encoded. Can be nil.
outErrorthe error object. Upon failure, it's contents will be filled. Can be nil.
Returns
the encoded data as a UIImage or nil if there was an error.
Since
5.9.0

◆ generateFromData:error:

- (nullable UIImage *) generateFromData: (nullable NSData *)  data
error: (NSError *_Nullable *_Nullable)  outError 

Generates a UIImage instance holding the encoded data.

Parameters
datathe NSData to be encoded. Can be nil.
outErrorthe error object. Upon failure, it's contents will be filled. Can be nil.
Returns
the encoded data as a UIImage or nil if there was an error.
Since
5.9.0

◆ generateFromData:encodings:error:

- (nullable UIImage *) generateFromData: (nullable NSData *)  data
encodings: (nullable NSArray< SBSEncodingRange * > *)  encodings
error: (NSError *_Nullable *_Nullable)  outError 

Generates a UIImage instance holding the encoded data.

Parameters
datathe NSData to be encoded. Can be nil.
encodingsthe NSArray of SBSEncodingRange instances. Can be nil.
outErrorthe error object. Upon failure, it's contents will be filled. Can be nil.
Returns
the encoded data as a UIImage or nil if there was an error.
Since
5.9.0

◆ setOptions:error:

- (BOOL) setOptions: (NSDictionary< NSString *, id > *)  options
error: (NSError *_Nullable *_Nullable)  outError 

Sets the given options to the generator enine.

Parameters
optionsthe NSDictionary of options. Cannot be nil.
outErrorthe error object. Upon failure, it's contents will be filled. Can be nil.
Returns
YES if the operation was successful. NO upon failure.
Since
5.9.0

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