Table of contents
Swift
Objective-C

License Initialization

Get a trial license

You can request a 30-day trial license via the Request a Trial License link.

You can contact our support team via the Contacting Us link when your license generation failed.

Get a Full License

Contact us to purchase a full license.

Set the License In the Code

For BarcodeScanner

var config = new BarcodeScannerConfig("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
var result = await BarcodeScanner.Start(config);

For Foundational Barcode Reader

The following shows how to set the license in the code.

public partial class CameraPage : ContentPage, ILicenseVerificationListener
{
    public CameraPage()
    {
        InitializeComponent();
        LicenseManager.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this);
    }
    public void OnLicenseVerified(bool isSuccess, string message)
    {
        if (!isSuccess)
        {
            Console.WriteLine("License initialization failed: " + message);
        }
    }
    public void OnFailure(int errorCode, string errorMessage)
    {
        MainThread.BeginInvokeOnMainThread(() =>
        {
            DisplayAlert("Error", errorMessage, "OK");
        });
    }
}

This page is compatible for: