Table of contents
Swift
Objective-C

How to Upgrade to Version 11.x

From version 9.x or earlier

Dynamsoft Barcode Reader SDK has been refactored to integrate with DynamsoftCaptureVision (DCV) architecture. To upgrade from version 9.x or earlier to 11.x, we recommend you to follow the User Guide and re-write your codes. This section highlights only the key changes and necessary actions for upgrading the SDK.

Update the License Key

Request a 30-Day Free Trial License

Visit the Request a Trial License page to obtain a 30-day free license. This option is ideal for initial evaluation or testing of new SDK features.

Annual Online Full License

If you are using an Annual Online Full License, your license will continue to work with the current SDK version without the need for updates. Go to Customer Portal to get your license key.

Perpetual License

For users with a Perpetual License, please contact our sales team to update your license. You can reach out through our Contacting Us page for assistance.

Update the Package Version

You need to update the version number in your Maven dependencies to use the latest version. Update your pom.xml file with the following version:

<repositories>
    <repository>
        <id>dbr</id>
        <url>https://download2.dynamsoft.com/maven/dbr/jar</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.dynamsoft</groupId>
        <artifactId>dbr</artifactId>
        <version>11.0.6100</version>
    </dependency>
</dependencies>

Update the License Activation Code

Starting from 11.0, we have unified the API for setting licenses across different Dynamsoft products.

Old APIs New APIs
BarcodeReader.initLicense LicenseManager.initLicense

Update Single Image Decoding APIs

The APIs for decoding single image have been adjusted as follows:

Old APIs New APIs
BarcodeReader.decodeFile CaptureVisionRouter.capture
BarcodeReader.decodeFileInMemory CaptureVisionRouter.capture
BarcodeReader.decodeBuffer CaptureVisionRouter.capture
BarcodeReader.decodeBufferedImage CaptureVisionRouter.capture
class TextResult class BarcodeResultItem
BarcodeReader.decodeBase64String Currently not available.

Update Video Streaming Decoding Code

ImageSourceAdapter is added to replace the FrameDecodeingParameters and the previous video methods. You should implement ImageSourceAdapter to transfer image data from camera or video file to buffer.

Migrate Your Templates

The template system is upgraded. The template you used for the previous version can’t be directly recognized by the new version. Please use the template upgrade tool to upgrade your template.

The template-based APIs have been updated as follows:

Old APIs New APIs
BarcodeReader.initRuntimeSettingsWithFile CaptureVisionRouter.initSettingsFromFile
BarcodeReader.initRuntimeSettingsWithString CaptureVisionRouter.initSettings
BarcodeReader.outputSettingsToFile CaptureVisionRouter.outputSettingsToFile
BarcodeReader.outputSettingsToString CaptureVisionRouter.outputSettings
BarcodeReader.resetRuntimeSettings CaptureVisionRouter.resetSettings
BarcodeReader.appendTplFileToRuntimeSettings Not available.
BarcodeReader.appendTplStringToRuntimeSettings Not available.
BarcodeReader.getAllParameterTemplateNames Not available.

Migrate Your PublicRuntimeSetting

The class PublicRuntimeSetting has been refactored. It retains commonly used properties via SimplifiedCaptureVisionSettings while removing the previously complex property settings, which are now exclusively supported through templates.

The APIs for accessing and updating runtime settings have been adjusted as follows:

Old APIs New APIs
BarcodeReader.getRuntimeSettings CaptureVisionRouter.getSimplifiedSettings
BarcodeReader.updateRuntimeSettings CaptureVisionRouter.updateSettings

Migrate to SimplifiedCaptureVisionSettings

The following properties are replaced by similar properties under SimplifiedCaptureVisionSettings. They can also be set via a template file(String).

PublicRuntimeSetting Property SimplifiedCaptureVisionSettings Parameter Template File Parameter
region roi & roiMeasuredInPercentage TargetROIDef.Location.Offset
timeout timeout CaptureVisionTemplates.Timeout

Migrate to SimplifiedBarcodeReaderSettings

The following properties are replaced by similar properties under SimplifiedBarcodeReaderSettings. The majority of them can also be set via a template file(String).

PublicRuntimeSetting Property SimplifiedBarcodeReaderSettings Property Template File Parameter
minBarcodeTextLength minBarcodeTextLength BarcodeFormatSpecification.BarcodeTextLengthRangeArray
minResultConfidence minResultConfidence BarcodeFormatSpecification.MinResultConfidence
localizationModes localizationModes BarcodeReaderTaskSetting.LocationModes
expectedBarcodesCount expectedBarcodesCount BarcodeReaderTaskSetting.ExpectedBarcodesCount
barcodeFormatIds barcodeFormatIds BarcodeReaderTaskSetting.BarcodeFormatIds
barcodeFormatIds_2 barcodeFormatIds BarcodeReaderTaskSetting.BarcodeFormatIds
deblurModes deblurModes BarcodeReaderTaskSetting.DeblurModes
deblurLevel deblurModes BarcodeReaderTaskSetting.DeblurModes
maxAlgorithmThreadCount maxThreadsInOneTask BarcodeReaderTaskSetting.MaxThreadsInOneTask
grayscaleTransformationModes grayscaleTransformationModes ImageParameter.GrayscaleTransformationModes
imagePreprocessingModes grayscaleEnhancementModes ImageParameter.GrayscaleEnhancementModes

Remarks:

  • The 2 groups of barcode formats are merged.
  • deblurLevel is deprecated. You can use deblurModes instead.
  • The mode IPM_MORPHOLOGY of imagePreprocessingModes is migrated to BinarizationModes. The mode arguments MorphOperation, MorphOperationKernelSizeX, MorphOperationKernelSizeY, MorphShape are now available for all modes of BinarizationModes.

Migrate to Template File

The following properties can only be set via a template file. Please call BarcodeReader.outputSettingsToFile first with the old version to export the settings and then use the template upgrade tool to upgrade your template.

PublicRuntimeSetting Property Template File Parameter
scaleDownThreshold ImageParameter.ImageScaleSettings
binarizationModes ImageParameter.BinarizationModes
textResultOrderModes BarcodeReaderTaskSetting.TextResultOrderModes
returnBarcodeZoneClarity BarcodeReaderTaskSetting.ReturnBarcodeZoneClarity
scaleUpModes BarcodeReaderTaskSetting.BarcodeScaleModes
barcodeZoneMinDistanceToImageBorders BarcodeFormatSpecification.BarcodeZoneMinDistanceToImageBorders
colourConversionModes ImageParameter.ColourConversionModes
regionPredetectionModes BarcodeReaderTaskSetting.RegionPredetectionModes
textureDetectionModes ImageParameter.TextureDetectionModes
textFilterModes ImageParameter.TextDetectionMode & ImageParameter.IfEraseTextZone
dpmCodeReadingModes BarcodeReaderTaskSetting.DPMCodeReadingModes
deformationResistingModes BarcodeReaderTaskSetting.DeformationResistingModes
barcodeComplementModes BarcodeReaderTaskSetting.BarcodeComplementModes

Migrate to Other APIs

The PDF properties of PublicRuntimeSetting are moved to set via the setPDFReadingParameter method of DirectoryFetcher and FileFetcher with a PDFReadingParameter parameter.

PublicRuntimeSetting Property
pdfReadingMode
pdfRasterDPI

The Intermediate Result system is redesigned and the following properties are deprecated.

PublicRuntimeSetting Property
intermediateResultTypes
intermediateResultSavingMode

Removed

The following properties are removed.

PublicRuntimeSetting Property
barcodeColourModes
resultCoordinateType
terminatePhase
FurtherModes Property
colourClusteringModes

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: