Dev Center
Swift
Objective-C
Table of contents

License Methods

Method Description
initLicense Initialize license for DynamsoftBarcodeReader.

initLicense

Initializes DynamsoftBarcodeReader with a license.

+ (void)initLicense:(nonnull NSString *)license verificationDelegate:(nonnull id<DBRLicenseVerificationListener>)listener 
NS_SWIFT_NAME(initLicense(_:verificationDelegate:));

Parameters

[in] license The license key. [in, out] verificationDelegate The listener that handles callback when the license verification message is returned by the license server. See also DBRLicenseVerificationListener.

Return Value

The instance of DynamsoftBarcodeReader.

Code Snippet

  • Objective-C
  • Swift
  1. [DynamsoftBarcodeReader initLicense:@"Put your license here" verificationDelegate: self];
    - (void)DBRLicenseVerificationCallback:(bool)isSuccess error:(NSError *)error{
    }
    
  2. DynamsoftBarcodeReader.initLicense("Put your license here", verificationDelegate: self)
    func dbrLicenseVerificationCallback(_ isSuccess: Bool, error: Error?) {
    }
    

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: