import {NativeModules} from 'react-native'; // @ts-ignore Check whether __turboModuleProxy exists, it may not const isTurboModuleEnabled = global.__turboModuleProxy != null; const DynamsoftLicenseModule = isTurboModuleEnabled ? require("./NativeDynamsoftLicenseModule").default : NativeModules.DynamsoftLicenseModule; /** * The LicenseManager class provides a set of APIs to manage the licensing for the Dynamsoft Capture Vision architecture. * @hideconstructor * */ export class LicenseManager { /** * Initializes the license for the application using a license key. *
Code Snippet:
* * ``` * LicenseManager.initLicense('your-license-key').then(() => { * //Init license successfully. * }).catch(error => { * console.error("Init license failed.", error); * }); * ``` * * @param license - The license key to be used for initialization. * @return Promise