Table of contents
Swift
Objective-C

This documentation is deprecated. It applies only to legacy version 9.x of Barcode Reader and must not be used for new development.

Please refer to the latest documentation and Migration Guide, which supersede this content.

License Control

license

Specify an online license or an offline license. Dynamsoft usually provides an online license.

license needs to be set before createInstance() or loadWasm().

NOTE:

Another way to set the license is to use the script tag’s data-license attribute.

static license: string

Code Snippet

<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.42/dist/dbr.js" data-license="YOUR-LICENSE-KEY"></script>

or

Dynamsoft.DBR.BarcodeReader.license = "YOUR-LICENSE-KEY";

deviceFriendlyName

Sets a human-readable name that identifies the device. This name will appear in the device details table when you check the statistics of the according license.

static deviceFriendlyName: string

Default value

""

Code Snippet

Dynamsoft.DBR.BarcodeReader.deviceFriendlyName = "Harry-Potter-iPhone";

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: